• 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: digit not followed by a period
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: digit not followed by a period


  • Subject: Re: digit not followed by a period
  • From: Rhostik <email@hidden>
  • Date: Mon, 12 Jan 2004 15:13:22 +0000

On 11 Jan 2004, at 20:17, Emmanuel wrote:

At 4:59 PM +0000 11/01/04, Rhostik wrote:
But has the look-ahead assertion not been implemented? Where

"\\d(?!\\.)"

finds a digit not followed by a period. It doesn't work for me...

This should work:

"[0-9][^.]"

or that, if we want to match a final digit:

"[0-9]([^.]|$)"

Sorry, I gave too simple an example. As the sequence to exclude gets longer, the ^ method gets much more complicated. How about a line that doesn't begin with 65.225.78:

"^(?!65\\.225\\.78)"

or, using ^ method:

"(^[^6]|6[^5]|65\\.[^2]|65\\.2([0 -9]\\.|[^2])|65\\.22[^5]|65.225\\.[^7]|65\\.225\\.7[^8])"

Grep uses the ^ method but I was hoping for a simpler solution. Will I need perl?

-Ian
_______________________________________________
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: digit not followed by a period
      • From: Emmanuel <email@hidden>
References: 
 >Re: How can I display the number of records processed using a thermometer (From: Martin Orpen <email@hidden>)
 >Re: How can I display the number of records processed using a thermometer (From: Rhostik <email@hidden>)
 >Re: How can I display the number of records processed using a thermometer (From: Emmanuel <email@hidden>)
 >Re: How can I display the number of records processed using a thermometer (From: Rhostik <email@hidden>)
 >Re: digit not followed by a period (From: Emmanuel <email@hidden>)

  • Prev by Date: Re: parsing Unix date
  • Next by Date: Re: Halt script in progress...
  • Previous by thread: Re: digit not followed by a period
  • Next by thread: Re: digit not followed by a period
  • Index(es):
    • Date
    • Thread