Re: A Better Regex
Re: A Better Regex
- Subject: Re: A Better Regex
- From: "Mark J. Reed" <email@hidden>
- Date: Sat, 18 Aug 2007 21:23:47 -0400
On 8/18/07, Doug McNutt <email@hidden> wrote:
> >As for \s, I'm not sure, neither for "find text" nor for "ufind text", and I didn't test, personally I use the longer key in the bottom row of the keyboard :-)
>
> Cute. But doesn't \s apply to all white space items including tab and some other control characters?
Yes. At least in Perl, \s is equivalent to [ \t\n\r\f], that is, it
matches a space, a horizontal tab, a newline, a carriage return, or a
form feed. It is perhaps odd that it doesn't include the vertical
tab. The POSIX character class [:space:] matches this same set of
characters.
In a Unicode environment one may want to expand the list of
"whitespace" characters to all 19 that have the WhiteSpace property.
--
Mark J. Reed <email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden