Re: digit not followed by a period
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.