Dear all, I am using preg_match function to check for the alpha-numeric values of a particular field in the following way.
(!(preg_match('/[0-9a-zA-Z]*$/',$physician_id)))
How can I use this function to check for an empty space(i.e., " ")? Can any body help me in this issue? regards, Indrajit.
(!(preg_match('/[\w\s]*$/',$physician_id)))
Will match any letter or number, plus any whitespace(tabs, spaces, returns)
(!(preg_match('/[\w ]*$/',$physician_id)))
Will match any letter or number, plus spaces.
depends on what kind of empty space you are talking about. You can check for spaces by just typing a space before the 0-9, and for a tab by putting backslash-t.
The PHP manual contains a page that explains all this stuff.
A forum, a FAQ, email notification, what else do you need?