We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Here's a normal replacement, without any anchors (works fine):
mysql> SELECT REGEXP_REPLACE('ABCABC', 'A', '*'); +------------------------------------+ | REGEXP_REPLACE('ABCABC', 'A', '*') | +------------------------------------+ | *BC*BC | +------------------------------------+ 1 row in set (0.00 sec)
If we add the beginning of line anchor, it fails to replace:
mysql> SELECT REGEXP_REPLACE('ABCABC', '^A', '*'); +-------------------------------------+ | REGEXP_REPLACE('ABCABC', '^A', '*') | +-------------------------------------+ | ABCABC | +-------------------------------------+ 1 row in set (0.00 sec)
End of line anchor works fine:
mysql> SELECT REGEXP_REPLACE('ABCABC', 'C$', '*'); +-------------------------------------+ | REGEXP_REPLACE('ABCABC', 'C$', '*') | +-------------------------------------+ | ABCAB* | +-------------------------------------+ 1 row in set (0.00 sec)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Here's a normal replacement, without any anchors (works fine):
If we add the beginning of line anchor, it fails to replace:
End of line anchor works fine:
The text was updated successfully, but these errors were encountered: