Re: Sorting IP addresses
Re: Sorting IP addresses
- Subject: Re: Sorting IP addresses
- From: Marconi <email@hidden>
- Date: Thu, 18 Dec 2003 23:53:51 -0700
At 9:21 PM +0100 12/18/03, Emmanuel wrote:
>
>
You could download Smile (4.3 MB) and install it. Then, assuming your list is a list of string l:
This may very well work but is not exactly my idea of automation....
>
>
- File > New text
>
- File > New text (again)
>
- in the front text window, type:
>
tid(return)
>
set w to window 2
>
set text of w to (l as text)
>
change "(^|\\.)([0-9])(\\.|$)" into "\\100\\2\\3" in w with regexp
>
change "(^|\\.)([0-9]{2})(\\.|$)" into "\\10\\2\\3" in w with regexp
>
- select all that text, press Enter
>
- bring the second window to the front
>
- Script > More menu bar > Edit > Sort paragraphs
>
- bring the second window (the window where you script) to the front
>
- type
>
change "(^|\\.)[0]+" into "\\1" in w with regexp
>
set l to text items of (get text of w)
>
- select those two lines, press Enter
...
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.