• 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: Find ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find ?


  • Subject: Re: Find ?
  • From: Emmanuel <email@hidden>
  • Date: Mon, 12 May 2003 18:15:20 +0200

At 10:07 AM -0400 12/05/03, Richard Nagle wrote:
>Okay,
>if I wanted to find a string. xxx.xxx.xxx
>now it can also be xx.xxx.xx or xxx.x.xxx. but it will
>always, will have two periods. (String is IP#)
>
>What would be the statement to parse,
>mail headers, to extract IP#

Err... are you on an Internet Protocol with 3-bytes IP addresses?

The regular expression I use for the digital dotted form of IP is:

(^|[^0-9])([0-9]{1,3}\.){3}[0-9]{1,3}

This does not strictly match IP's, since it will also match 999.999.999.999.

To use regular expressions, an easy way is to install the Satimage osax, available for free at:
<http://www.satimage-software.com/en/softx.html#osax>

Once you have the Satimage osax installed, you use:

------------------------------
find text [the regular expression] in [the string] with regexp
------------------------------

Emmanuel
_______________________________________________
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.

References: 
 >Find ? (From: Richard Nagle <email@hidden>)

  • Prev by Date: Re: Applescript crash
  • Next by Date: Re: SE2beta contextual Find feature request
  • Previous by thread: Find ?
  • Next by thread: Eigenvalues &/or eigenvectors, anyone?
  • Index(es):
    • Date
    • Thread