[thelist] backreferencing
Alex Beston
alex.beston at gmail.com
Sun Aug 6 11:27:05 CDT 2006
Hi Evolters
$string = "<STRONG>some text</STRONG>";
$pattern = "/<(.*)>.*<\/\1>/";
preg_match_all($pattern, $string , $matches, PREG_PATTERN_ORDER);
print_r($matches);
Im trying to get backreferencing [AFAIK the \1 relates to the (.*) ]
working for php but i just get this:
Array ( [0] => Array ( ) [1] => Array ( ) )
argh!
what am I doing wrong? perhaps I need to change some settings in php.ini?
ta!
Alex
More information about the thelist
mailing list