Need MySQL string function
Posted on 2011-09-13
new to mySQL.
i'm using the following function on a string in vb.net:
Public Function subStringCount(ByVal fullString As String, ByVal subString As String) As Integer
Dim r As New Regex(subString)
Dim mc As MatchCollection = r.Matches(fullString)
i'm calling it like this:
It takes a string and counts the occurance of a subset of characters within the string.
my data can look like this: "S0ETS2ETS5C0ETS2C0ETS1C1ET"
Is it possible to have this operation done within the where clause of my select? I'd rather not have to pull all the data back before performing this operation. so, something like:
select game_history from table1 where function_counting_occurance_subset_of_char(game_history, 'ET') = 5;