PHP and regular expressions



Hi,
I'm new to this group and regular expressions. I want to extract text
from a newspaper website using regular expressions and php
I'm using this regular expression at the moment

$regexp = "%<table cellspacing=\"0\" cellpadding=\"0\"> (.+) <img
height=\"1\" alt=\"Today's News\" />%s";

Each news story is in between those tags , So if I extract those
chunks of html using

preg_match($regexp,$document,$matches);

where $document is a handle on the file. I can store them in %matches
for further processing. Alas it does not work and i cannot figure out
why

Can anyone help?
Thanks

.



Relevant Pages

  • Re: Problem with Regular Expressions in .NET
    ... This won't recognize comments or strings - If your code contains a string ... > I'm using regular expressions to extract some information from my ... > I want to extract with regular expression a string that contains the ... > IgnoreCase flag, the MultiLine flag, but there is nothing to do. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Problem with Regular Expressions in .NET
    ... This won't recognize comments or strings - If your code contains a string ... > I'm using regular expressions to extract some information from my ... > I want to extract with regular expression a string that contains the ... > IgnoreCase flag, the MultiLine flag, but there is nothing to do. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Extracting Text from the right
    ... >1) To extract to the right of the last "." ... lot or your parsing tasks become more complicated, regular expressions ... shortest 2 chars. ... characters in the string. ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Pattern Matching in a file
    ... > However I need to extract specific references within that document. ... > What is the best way to extract references of the type above - is it ... > Regular expressions are a bit of a dark art to me, ... > Any help / pointers would be very much appreciated ...
    (microsoft.public.dotnet.languages.csharp)
  • Problem with Regular Expressions in .NET
    ... I'm using regular expressions to extract some information from my ... vb.net source code files. ... I want to extract with regular expression a string that contains the ... IgnoreCase flag, the MultiLine flag, but there is nothing to do. ...
    (microsoft.public.dotnet.languages.vb)