Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upMultiple replacements in a string are not working properly #48
Comments
|
It seems like the library only accepts one group on the passed regex. The output now should be: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using react-string-replace for translations. I have a string and I want to replace a couple of substitutes.
The code looks like this:
From my understanding, my regular expression should match only the first link and the
[shortcode]. But the result in the console looks like this:I don't understand why is the middle match there. It doesn't match the regular expression.