To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.off-topic.geekOpen lugnet.off-topic.geek in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Off-Topic / Geek / 4441
    Re: Regular Expression help? —David Eaton
   (...) For *BORDER* tags, you're in luck: /<img(\s+[^bB]\w+=("...|\S*))*>/i But that is on the (valid?) presumption that the ONLY attribute for an <img> tag that starts with the letter "B" is "BORDER". I suppose I could be wrong what with all the (...) (21 years ago, 8-Jul-03, to lugnet.off-topic.geek)
   
        Re: Regular Expression help? —Dan Boger
   (...) ^ missing "*" here --------/ (...) wouldn't this also break on this: <img src="1.jpg" alt="Some Text with Contrived B=something in it"> :) But other than that, good idea to look at what's valid :) (21 years ago, 8-Jul-03, to lugnet.off-topic.geek)
   
        Re: Regular Expression help? —David Eaton
   (...) Woops, yep (...) ? Wouldn't it not, since it matches on the double quote first? IE it would match alt="........." as a single dealy? I'll test.... Ran as a test: foreach( '<img src="foo.jpg">',# matches '<img border="" src="foo.jpg">',# no (...) (21 years ago, 8-Jul-03, to lugnet.off-topic.geek)
   
        Re: Regular Expression help? —Andy Lynch
   (...) David, Thanks for this additional approach. I thought that I had tried something similar to this, but I must have gotten some portion of it wrong, as I could get no matches in my data. Thanks again, -Andy Lynch (21 years ago, 9-Jul-03, to lugnet.off-topic.geek)
 

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR