• 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 regular expressions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find regular expressions


  • Subject: Re: find regular expressions
  • From: Tom Worster <email@hidden>
  • Date: Sat, 01 Nov 2008 11:00:38 -0400
  • Thread-topic: find regular expressions

On 11/1/08 9:06 AM, "Paul Russell" <email@hidden> wrote:

>> base -- matches all your base, i mean: all instances of base.
>> base(?<!data) -- matches all your base including database!
>> base(?<=data) -- matches nothing, not even your database!
>>
>
> I think you have the lookbehind assertions in the wrong part of your
> expression - you probably want
> (?<=data)base or (?<!data)base in the above examples ?

thanks, paul, i think you're right.

the ICU documentation doesn't mention where assertions should be placed
relative to other parts of the pattern. i assumed it would go the same place
relative to normal matching subpattern (base) as a look-ahead assertion
would.

i just reread the section on assertions in the PCRE docs and, while also not
mentioning the positioning, is shows a couple of examples with the
look-behind assertion before the match.

i get the idea of putting it before now. but i didn't intuit it at the time.


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: find regular expressions (From: Paul Russell <email@hidden>)

  • Prev by Date: Re: Xcode question regarding cleaning
  • Next by Date: Re: new build phase and other framework topics
  • Previous by thread: Re: find regular expressions
  • Next by thread: Show/hide whitespace characters (a.k.a. "invisibles") in Xcode editor?
  • Index(es):
    • Date
    • Thread