PHP - Check for whitespace at beginning of string
- by ITg
I need to use preg_match to check that only a-z0-9. is used (including full stop(.)). I don't want to replace anything. My problem is that it doesn't notice white space at beginning of a string.
Also, if anyone knows how to check there is no two full stops in a row, I would be very grateful.
What I have so far:
("/[^a-z0-9.]+$/",$request)
Thanks !