• 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: A Better Regex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Re: A Better Regex (From: T&B <email@hidden>)

  • Prev by Date: Re: A Better Regex
  • Next by Date: Q: Using (sound) volume settings
  • Previous by thread: Re: A Better Regex
  • Next by thread: Fwd: A Better Regex
  • Index(es):
    • Date
    • Thread