• 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: Why is / a metachar in regular expressions ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Why is / a metachar in regular expressions ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Why is / a metachar in regular expressions ? (From: Jens Alfke via Cocoa-dev <email@hidden>)
 >Re: Why is / a metachar in regular expressions ? (From: Gabriel Zachmann via Cocoa-dev <email@hidden>)
 >Re: Why is / a metachar in regular expressions ? (From: Rick Mann via Cocoa-dev <email@hidden>)
 >Re: Why is / a metachar in regular expressions ? (From: Steve Mills via Cocoa-dev <email@hidden>)
 >Re: Why is / a metachar in regular expressions ? (From: Rick Mann via Cocoa-dev <email@hidden>)

  • Prev by Date: Re: Why is / a metachar in regular expressions ?
  • Next by Date: Re: Pausing an animation
  • Previous by thread: Re: Why is / a metachar in regular expressions ?
  • Next by thread: Re: Why is / a metachar in regular expressions ?
  • Index(es):
    • Date
    • Thread