Forum Moderators: coopster
I am applying regex on a page to fetch out data between <address></address> tags and facing few problems
this is what I am using currently
preg_match_all("/<address[^>]*>(.*?)<\/address>/",$content,$output3);
but I am getting empty array in return
Array
(
[0] => Array
(
)
[1] => Array
(
)
)
I also tried the following
preg_match_all("/<address>.*?<\/address>/",$content,$output3);
but it also gives empty result.
I wonder if anyone could shed some light that what am I doing wrong here?
thank you
preg_match_all("/<address>[\/\(\)-:<>\w\s]+<\/address>/",$cnt,$mat);
btw if I use this
preg_match_all("^<address>[\/\(\)-:<>\w\s]+<\/address>$",$cnt,$mat);
i get delimiter error... why is that? because i guess ^$ are used for start and end of the pattern...