I'm trying to build a text factory (or something) that will re-format
HTML emails as text. The "translate" option does fine, except that it
deletes links.
What I'm trying to do is take a paragraph like:
Notice, incidentally, that relational information is <a
href="http://one.com/">rather different from</a> the ultimate standard
that determines the accuracy of any proposed grammar. <a href="http://
two.com/">It may be, then, that this selectionally introduced</a>
contextual feature is not quite equivalent to an abstract underlying
order. Note that relational information <a href="http://
three.com/">cannot be arbitrary</a> in a stipulation to place the
constructions into these various categories.
And convert it into:
Notice, incidentally, that relational information is rather
different from the ultimate standard that determines the accuracy of
any proposed grammar. It may be, then, that this selectionally
introduced contextual feature is not quite equivalent to an abstract
underlying order. Note that relational information cannot be arbitrary
in a stipulation to place the constructions into these various
categories.
http://one.com/
http://two.com/
http://three.com/
I have the find/replace syntax to do the basic replacement:
Find: [^<>\r]*?<a href="(.+?)">[^<>\r]*
Replace: \1\r
But this necessarily deletes the entire paragraph, and just gives me:
http://one.com/
http://two.com/
http://three.com/
I'd also be willing to do this in AppleScript or something, but I'm
having trouble making that work in any useful way. I can recurse
lines, but doing the find and replace and everything else in there is
awful hard.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "BBEdit Talk" group.
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 specific feature request or would like to report a suspected (or
confirmed) problem with the software, please email to "[email protected]"
rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---