After coming to the shocking realization that regular expressions in JavaScript are somewhat different from the ones in PCE, I am stuck with the following.
In php I extract a number after x:
(?x)[0-9]+
In JavaScript the same regex doesn't work, due to invalid group resulting from the capturing parenthesis difference.
So I am trying to achieve the same trivial functionality, but I keep getting both the x and the number:
(?:x)([0-9]+)
How do I capture the number after x without including x?
(?!x)([0-9]+)=([0-9]+). And(?x)[0-9]+is also equal to[0-9]+. To get a sequence of digits after anxchar in PHP/JS, you can just use/x(\d+)/and grab Group 1 value. Or, use a lookbehind,/(?<=x)\d+/