[wplug] regex help

John Harrold jmh17 at pitt.edu
Mon Jan 19 15:56:56 EST 2004


Sometime in January rblackwe at speakeasy.net assaulted the keyboard and produced:

| It is not advisable to roll your own regex to parse html.  Use a  module
| off CPAN to to this.

i'm assuming you are replying to russ here:

> Need some help on a PCRE regex syntax.
> 
> I"m trying to come up with the regex that will find:
> <td 'any characters'>
> 
> So it would match:
> 
> <td>
> <td class="sub">
> <td colspan=2>
> 
> etc.
> 
> I've been racking my brain with different sites trying to find the right
> regex to use with preg_replace() in PHP but can't seem to do it.
 
since he's trying to do this in php, i don't think sending him to cpan is a
real useful suggestion. i would suspect that if he was familiar with perl
and perl was an option, he wouldn't be asking about regular expressions in
php. just a thought.

-- 
--------------------------------------------------------------------------
                                               | /"\
 john harrold                                  | \ / ASCII ribbon campaign
      jmh at member.fsf.org                    |  X  against HTML mail
           the most useful idiot               | / \
--------------------------------------------------------------------------
 What difference does it make to the dead, the orphans, and the homeless,
 whether the mad destruction is brought under the name of totalitarianism or
 the holy name of liberty and democracy?
 --Gandhi
--------------------------------------------------------------------------
gpg --keyserver keys.indymedia.org --recv-key F65A739E
--------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://penguin.wplug.org/pipermail/wplug/attachments/20040119/7cfeab79/attachment-0001.bin


More information about the wplug mailing list