Regexp: (?=(\d+))\w+\1
String: 456x56
Hi,
I am not getting the concept, how this regex matches "56x56" in the string "456x56".
- The lookaround, (?=(\d+)), captures 456 and put into \1, for (\d+)
- The wordcharacter, \w+, matches the whole string("456x56")
- \1, which is 456, should be followed by \w+
- After backtracking the string, it should not find a match, as there is no "456" preceded by a word character
However the regexp matches 56x56.