regexr icon indicating copy to clipboard operation
regexr copied to clipboard

Issue with group backreference by name

Open JaoodxD opened this issue 4 years ago • 4 comments

RegExr recognize naming of capturing group, however at the same time when i try to refer to named group with '\k<groupName>' it counts '\k' as escaped character. image

JaoodxD avatar Oct 30 '20 06:10 JaoodxD

Both PCRE2 and javascript do not support \k

https://www.regular-expressions.info/refcapture.html

jurriaanr avatar Nov 10 '20 18:11 jurriaanr

Both PCRE2 and javascript do not support \k

https://www.regular-expressions.info/refcapture.html

Are you that sure about PCRE2? https://www.regular-expressions.info/refext.html image

JaoodxD avatar Nov 11 '20 08:11 JaoodxD

It's unclear to me why this was closed – javascript does support \k:

image

But this tool still does not recognize \k as anything other than an escaped k:

image

roryabraham avatar Apr 10 '22 14:04 roryabraham

It does appear that \k support has been added in the intervening years. Opening this back up. Given that we have support for it in PCRE, this should be an easy addition.

gskinner avatar Apr 10 '22 16:04 gskinner