Re: find regular expressions
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