[thelist] Regular expression needed

Edwin Horneij ed_horneij at yahoo.com
Mon Sep 27 20:12:19 CDT 2004


--- Razvan Pop <razvan at cpea.ro> wrote:


> I have this:
> <NOBR>1. <A TITLE="GEICO auto insurance, online car insurance quote,
> motorcycle insurance quote, online insurance sales and service from a
> leading insurance company. ...  " TARGET=_main
> HREF=http://www.geico.com/>GEICO Car Insurance. Get an auto insurance
> quote and save today. ...</A></NOBR><BR>
> 
> Can I, using a regular expression, delete all but
> http://www.geico.com/ ?

Yes.

/ HREF=([^>]+)>/

But unless every link you want to parse is formatted in exactly the
same (somewhat idiosyncratic) manner, this regex may be too inflexible
to be of much use. 


		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail


More information about the thelist mailing list