Forum Moderators: phranque
My code:
if(preg_match("^[a-zA-Z]\w{0,25}$", $str) == 'false')
Warning: No ending delimiter '^' found in c:\program files\nusphere\apache\nsdocs\cms\modules\cm_pm.php on line 64
This is supposed to make sure the first character is a letter, the rest are alphanumeric, and it isn't longer than 24 characters.
Is there some PHP specific thing going on here?
I was actually testing for 'true', I'd been experimenting with the code I posted to try and debug it. Anyway, I tried testing for '1' and it now works perfectly.
So, are you sure this isn't black magic? ;)