At 09:30 -0700 10/28/09, BB Design wrote:
>I'm using BB Edit grep to select <a></a> links like this:
>
>(\<a.*\<\/a>)
>
>So I can paste the match using: \1
>
>However, I basically want to delete everything else in the document
>except these links, so that all I am left with is the links. Possible
>to modify my code to accomplish this? Thanks!

First: you better make sure that regular expression isn't greedy. It's likely 
to select everything from the first <a to the last </a> in the line or possibly 
to the end of the file.

(\<a.*\?<\/a>)

and next you'll need to allow for links that pass through lineend characters 
unless you know a lot about the structure of the html file.

In my favorite language it would be an s after the trailing quote of the 
overall expression, /<a.*?<\/a>/is. In BBEdit it's (\s) or something like that 
at the end of the expression.

-- 
--> So do we celebrate the start of a new decade at the end of this year? Or do 
the tens start at in January 2011? Was the first year, 0000 ACE, assigned Roman 
numeral I ?<--

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to