Re: Why is / a metachar in regular expressions ?
Re: Why is / a metachar in regular expressions ?
- Subject: Re: Why is / a metachar in regular expressions ?
- From: Saagar Jha via Cocoa-dev <email@hidden>
- Date: Wed, 18 Sep 2019 15:52:01 -0700
If you need any more confirmation, Swift’s NSRegularExpression escapes this
exact set of characters
<https://github.com/apple/swift-corelibs-foundation/blob/61340367345ddee8f126a1eb8db319a2925bd3be/CoreFoundation/String.subproj/CFRegularExpression.c#L70>,
so there isn’t an error in the documentation. (NSRegularExpression in
Foundation uses the same set, but it doesn’t go through this specific code path
as far as I can tell.)
Saagar Jha
> On Sep 18, 2019, at 15:06, Rick Mann via Cocoa-dev
> <email@hidden> wrote:
>
> Ah! So it is. Definitely not an error in the docs, assuming
> NSRegularExpression supports flags.
>
>> On Sep 18, 2019, at 14:54 , Steve Mills via Cocoa-dev
>> <email@hidden <mailto:email@hidden>> wrote:
>>
>> On Sep 18, 2019, at 16:50:39, Rick Mann via Cocoa-dev
>> <email@hidden> wrote:
>>>
>>> Yeah, I'm inclined to think it's an error in the docs.
>>
>> If you look at the input expression in this great site, you'll see 2 /'s as
>> part of it. They mark the beginning and the end (before flags).
>>
>> https://regexr.com
>>
>> --
>> Steve Mills
>> Drummer, Mac geek
>>
>> _______________________________________________
>>
>> Cocoa-dev mailing list (email@hidden)
>>
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>>
>> Help/Unsubscribe/Update your Subscription:
>>
>> This email sent to email@hidden <mailto:email@hidden>
>
>
> --
> Rick Mann
> email@hidden <mailto:email@hidden>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden
> <mailto:email@hidden>)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> <http://lists.apple.com/>
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden <mailto:email@hidden>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden