Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- preg_match frustration
September 21, 2008, 8:13 pm
rate this thread
Can someone help a regex noob?
$text = "clapham junction 1989";
$regexp = "[0-9][0-9]";
$dummy = preg_match($regexp, $text, $matches);
produces the error:
Warning: preg_match() [function.preg-match]: Unknown modifier '[' in
blah blah blah
Have I got the regex wrong? I'm trying to return any 4 digit number in
thanks in advance