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
[root@localhost ~]# cat re
/(a(?R)b)/
aabb
[root@localhost ~]# pcre2test re
PCRE2 version 10.39 2021-10-29
/(a(?R)b)/
aabb
No match
[root@localhost ~]#
I tested it at 10.39 and I don't have the latest version of pcre2, maybe the latest version has fixed it.. From what I understand, this should match.
As I understand it, the regular expression /(a(?R)b)/ means matching a nested string that starts with a and ends with b, and can have a and b in between. For the string aabb, it conforms to the above description because it can be decomposed into two substrings a and abb, where the second substring contains a nested substring ab, and therefore the matching succeeds.
The text was updated successfully, but these errors were encountered:
https://regex101.com/r/FbLcN6/1
Thank you for your prompt reply. This tool is great and helps me understand the matching process.
And this seems to be an issue with my use, (?R) needs an end judgement
I tested it at 10.39 and I don't have the latest version of pcre2, maybe the latest version has fixed it.. From what I understand, this should match.
As I understand it, the regular expression
/(a(?R)b)/
means matching a nested string that starts witha
and ends withb
, and can havea
andb
in between. For the stringaabb
, it conforms to the above description because it can be decomposed into two substringsa
andabb
, where the second substring contains a nested substringab
, and therefore the matching succeeds.The text was updated successfully, but these errors were encountered: