You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @slevithan. First off, great library. Super helpful in overcoming some of JavaScript RegExp's shortcomings!
Would love to see support for the possessive quantifier. I know it requires the lookahead + backreference trick, and that would affect the numbered backreferences in the original regexp, but I think it might be worth it. Given that we can use named backreferences, this problem might be mitigated. Might just need a little documentation with a warning about using them. Thoughts?
The text was updated successfully, but these errors were encountered:
Yeah, it could be really useful sometimes and it’s something I’ve thought about before as well. Thanks for bringing it up here.
I prefer for XRegExp to have complete solutions that handle all edge cases, so the effect on backreference numbers that you brought up is what made me avoid this in the past. But now that XRegExp supports the /n flag for named backreferences only, I could imagine this being done really well by requiring XRegExp’s /n flag in order to support possessive quantifiers.
This still would be moderately complex to implement though because of the way XRegExp processes regex syntax, which doesn’t currently have easy support for identifying the inner contents of an arbitrary grouping that contains any number of nested groups.
Hey @slevithan. First off, great library. Super helpful in overcoming some of JavaScript RegExp's shortcomings!
Would love to see support for the possessive quantifier. I know it requires the lookahead + backreference trick, and that would affect the numbered backreferences in the original regexp, but I think it might be worth it. Given that we can use named backreferences, this problem might be mitigated. Might just need a little documentation with a warning about using them. Thoughts?
The text was updated successfully, but these errors were encountered: