I have a regex created by myself that I am currently running in PHP. Although when I merge it over to Javascript, it refuses to work. I have also tried it in Python and it works perfectly fine.
Regex:
@[[](.[^]]+)[]][()](\d+)[)]
I have a regex created by myself that I am currently running in PHP. Although when I merge it over to Javascript, it refuses to work. I have also tried it in Python and it works perfectly fine. Regex:
|
|||||
|
JavaScript doesn't automatically escape your This will help you get a visual idea: PCRE:JS:Python:So to fix this, you need to escape the brackets
That's why it's good practice to escape this stuff instead of relying on quirks of the flavor. I generated these images through regex101. |
|||||||||
|