I am looking for some regex help for a MYSQL query. I am new to expressions and totally confused.
My database cell looks something like this:
1314{{Here is some data}}1213{{More data here}}1112{{Data ahoy}}
And I'm trying to write an expression that will try to match a dataset, but only the data in parentheses per year.
For example, say $ year = 1314 and $ term = "ahoy" .
With the REGEXP below:
$year\{\{.* $term.*\}\}
It returns a match - because it matches the final "}}" of the 1112 prefix dataset. I don't want this to be done, but despite reading this greedy / negative business, I can't get the syntax to work. What would be the best way to achieve what I need?
source share