Hi,
thank you for your reply.
It turns out that the problem was not actually the regexps itself. As you said this should be working I started to look for a problem elsewhere. It looks that the page content wasn't loaded properly into the variable - now it's sorted out and regexes are returning what they are supposed to.
Thank you for help.
cheers
User Profile
Collapse
-
preg_match_all returns an empty array
hi,
I have a problem with preg_match function returning empty arrays for my wonderful regexes. However, I can't see what I am doing wrong - maybe one of you could help?
I'm loading the source of a website into variable and then using preg_match_all to extract all occurrences of a string.
it looks like this (where source code is loaded into $page variable):[code=php]
preg_match ('/<div\s+?id="srN um_\d+?"\s+?cla ss="number">(.* ?)<\/div>/',...
No activity results to display
Show More
Leave a comment: