User Profile

Collapse

Profile Sidebar

Collapse
loriann
loriann
Last Activity: Oct 2 '08, 08:25 AM
Joined: Sep 28 '08
Location: Poland
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • loriann
    replied to preg_match_all returns an empty array
    in PHP
    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
    See more | Go to post

    Leave a comment:


  • loriann
    started a topic preg_match_all returns an empty array
    in PHP

    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>/',...
    See more | Go to post
    Last edited by pbmods; Sep 28 '08, 07:40 PM. Reason: Added CODE tags.
No activity results to display
Show More
Working...