PHP script with regular expressions

LekHeeptden

New Member
I'm trying to get the text between the heading tag using the following php script:\[code\]$search_string= < h1 >testing here< /h1 >;$text = preg_match('<%TAG%[^>]*>(.*?)</%TAG%>',$search_string, $matches);echo $matches[0]; \[/code\]When i try to run this script there is no value being returned. Instead there is warning message: Warning: preg_match() [function.preg-match]: Unknown modifier '(' in C:\xampp\htdocs\check_for_files.php on line 10Can anyone help with this please?
 
Back
Top