regexp2 icon indicating copy to clipboard operation
regexp2 copied to clipboard

Add support for Perl(PCRE) named and unnamed group capturing order

Open CIAvash opened this issue 4 years ago • 3 comments

In other words maintain the order of capture groups. With the MaintainCaptureOrder regexp option.

I also added inline option o. It's useful if you only have access to the pattern, but not the regex. But it only is useful if used at the start of the pattern, I couldn't find a way to prevent it from being used elsewhere.

I've never liked nor have been good with bitwise operations. So I don't know if I should've picked another number.

CIAvash avatar May 10 '21 12:05 CIAvash

Thanks for submitting this! It'll take me a bit to review and gather my thoughts on it.

dlclark avatar May 11 '21 22:05 dlclark

Is there anyway get named group?

like (1)(?<aa>2)

I want get aa only.

yywing avatar Jul 16 '21 09:07 yywing

@yywing Don't know why you asked that question here, as it's not relevant to the pull request. But you can do match.GroupByName(`aa`).

CIAvash avatar Jul 16 '21 10:07 CIAvash