I have to find how many numbers in the following String,
'~1~~2~~123~~~~12~~1~~~~' and the output should be 5.
Any help?
I have to find how many numbers in the following String,
'~1~~2~~123~~~~12~~1~~~~' and the output should be 5.
Any help?
MySQL cannot do that directly. You would have to dig into UDF (User defined functions). It would allow you to create a function that returns the number of number substrings in a string.
Regular expression need pattern to match and there no pattern to use regular expression in provided example. You can go here to see regular expression in mysql.