Hello e2o

Here's a little script which I hope will do as you wish:

tell application "BBEdit"
        find "(?<![0-9.])" searching in text 1 of text document 1 options  
{search mode:grep, backwards:true} with selecting match
        find "[0-9.]+" searching in text 1 of text document 1 options {search  
mode:grep} with selecting match
end tell

As sent the lines beginning with "find" have no line breaks. I think  
these line breaks might well be inserted by email system.

The script is based on the insertion point being put in the IP  
address. It looks back for the beginning of the IP address then  
selects the address looking forward.

You can record scripts like this which is an extremely excellent thing  
with BBEdit imho.

If you want to look into the Grep then the excellent Grep reference in  
BBEdit help will explain all.

That is if it works :)


Patrick

http://www.patrickjames.co.uk

On 8 Oct 2008, at 15:03, e2o wrote:

>
> Hello,
>
> I am constantly copying IP addresses out of BBEdit documents which
> contain notes for the numerous networks I manage. Selecting addresses
> is tiresome, especially for one who hates to remove hands from
> keyboard to drag-select with the mouse. Can anyone think of a quick
> way to select an IP address - something akin to double-clicking a word
> to select it? An applescript (or similar) assigned to a keyboard
> shortcut would do nicely.
>
> the addresses are in the format:  ###.###.###.###, but any of the four
> sets of numbers can have one to three digits, i.e. they could look
> like:
> 10.0.10.10 or 192.168.23.123, or 172.16.1.1,   etc.

--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to