I have a special case of capturing by regular expression in the SELECT statement.
This is the background: In a poorly designed database, a user might have stored the
amount as the following record:
I would like to capture the data with the digits and a period only.
And all the fields should be having same output in this case as:
My ideal query would be something like:
amount REGEXP '/[\\d\\.]+/is' AS amount
What can be the real alternative to this problem?
It is not a matching for a condition, but the data extraction:
extracting the digits and a period.
By this way, I can even sort the records numerically (low to high, or high to low) with results as expected.
Here were some other issues on regular expressions, a bit different than mine:
Thank you for your time in searching for a solution.