• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sorting IP addresses
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Sorting IP addresses
      • From: Emmanuel <email@hidden>
References: 
 >Sorting IP addresses (From: Marconi <email@hidden>)
 >Re: Sorting IP addresses (From: Steve Mills <email@hidden>)
 >Re: Sorting IP addresses (From: Graff <email@hidden>)
 >Re: Sorting IP addresses (From: Marconi <email@hidden>)
 >Re: Sorting IP addresses (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: Sorting IP addresses
  • Next by Date: Re: Sorting IP addresses
  • Previous by thread: Re: Sorting IP addresses
  • Next by thread: Re: Sorting IP addresses
  • Index(es):
    • Date
    • Thread