Re: extract URL from general text
Re: extract URL from general text
- Subject: Re: extract URL from general text
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 19 Mar 2008 00:20:40 -0400
Saying that you think AppleScript is good for parsing text removes the
need to also say you don't know Perl. ;-) But the idea that you need
any extra modules to grab URLs in Perl is ludicrous.
Still, while AS by itself may not shine at anything more complicated
than simple search/replace, it does shine at scripting other apps
that, in turn, shine at manipulating text. Like, say, BBEdit. If
your text is in BBEdit, you should let it do the heavy lifting - it's
very powerful. This might work (untested):
tell application "BBEdit"
replace "https?://\\S+" using "<a href=\"&\">&</a>" options {search
mode: grep}
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden