1

i want to grap data from this site by regexp

http://aymanalrefai.wordpress.com/2010/03/15/596/

i tried this

/<div class="entry">.*?<p class="postinfo">/is

but it didn't give me a correct result

any help ?

manhag
  • 322
  • 1
  • 7
  • 15
  • 1
    1. Don't use regex to parse HTML. It's unreliable. See http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags. 2. Your regex matches for me, but I can't tell what a "correct result" is unless you tell us. [1]: – Max Shawabkeh May 06 '10 at 06:48
  • i want to grap the internal box which starts with
    and ends with
    – manhag May 06 '10 at 06:57
  • What tool/language are you using ? Are lazy quantifiers available there ? Does it require escaping quotes ? – Jasmeet May 06 '10 at 07:07
  • That regex works for me. What do you mean when you say it gives you "initialization"? – Alan Moore May 06 '10 at 09:32
  • i am using Joomla and using component called econtent which grab data from rss i put this regex...but it gives me "initialization" and no response it may be a problem with wordpress http://aymanalrefai.wordpress.com/2010/03/15/596/ – manhag May 06 '10 at 14:32

1 Answers1

0

Try this :

/<div class="entry">[\s\S]+?</div>/is

Stephan
  • 41,764
  • 65
  • 238
  • 329