Regular expression in mySQL [migrated]
- by Rayne
I have a mysql table that has 2 columns - Column 1 contains a string value, and Column 2 contains the number of times that string value occurred.
I'm trying to find the string abc.X.def, where the beginning of the string is "abc.", followed by one or more characters, then the string ".def". There could be more characters following ".def".
How can I find such strings, then add the occurrence of such strings and display the results?
For example, if I have
abc.111.def23 1
abc.111.def 2
abc.22.def444 1
abc.111.def 1
Then I will get
abc.111.def23 1
abc.111.def 3
abc.22.def444 1
Thank you.