On May 13, 2006, at 4:23 PM, Greg Raven wrote:
Doug McNutt's solution seems pretty involved. In your place, I'd
replace "<a href" with "xxzxx", and "</a>" with "xxyxx". Then I'd
run BBEdit's Markup --> Utilities --> Translate, to remove all of
the other markup. I'd check at this point to see that all the other
markup was gone, and if not, use some Search and Replace using Grep
to finish the job.
Finally, I'd go back and replace "xxzxx" with "<a href" and "xxyxx"
with "</a>".
I acknowledge that this is a brute-force method, but it might be
faster that attempting to modify a perl/curl combination script to
deliver the results you want.
One minor consideration -- the following are all valid:
<a link='ax' href='asd'>
<a
href='asd'>
I'd probably search for (using grep):
<a\b
Where \b is a 'word boundary', and would mean that it's just
an '<a', and not '<abbr' or '<address' or similar.
You'll still have to go through and find those items that are
<a link='x'>, without an 'href' attribute, but it'll keep from
removing stuff that should be kept.
And, if you're not using xhtml, make sure that it's a case
insensitive search.
-----
Joe Hourcle
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>