Skip to content

What flavor of Regex does CoEditor Support? #1199

Answered by 1024jp
Boxserman asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thank you for the feedback.

The short answer is: CotEditor uses ICU flavored syntax since NSRegularExpression, which CotEditor relies on, is based on.
ref. https://developer.apple.com/documentation/foundation/nsregularexpression

As for the named capture, therefore, it must be captured with (?<name>foo) and replaced with ${name}. However, in fact, the replacement part seems not to work, although named capture itself works.
I'll look into it later.

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Boxserman
Comment options

Answer selected by 1024jp
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@1024jp
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants