Regex causing error
I tried the following Regex to disallow spaces in a text input field...
^[\S]*$
And got the following error...
Warning: preg_match() [function.preg-match]: No ending delimiter '^' found in /home/me/public_html/user/system/modules/low_variables/types/low_text_input/vt.low_text_input.php on line 107
Warning: Cannot modify header information - headers already sent by (output started at /home/me/public_html/user/system/modules/low_variables/types/low_text_input/vt.low_text_input.php:107) in /home/me/public_html/user/system/core/core.functions.php on line 296
What did i do wrong? I not a Regex expert :)
Replies
Low 21 Jan 2010 09:43
You have add delimiters to the regex. Try this on for size:
#^\S*$#
robin 21 Jan 2010 12:23
Ah, that worked.
Thanks