I'm using REGEXP to match specific strings out of a ton of text in a LONGTEXT column. For example:
Text text text text text
text text text text text
text text SOLD: 75/101 text
text text text text text
So my queries have been looking like this:
SELECT * FROM `test` WHERE `file` REGEXP
'SOLD:[ ]{1}[0-9]{1,2,3}/[0-9]{1,2,3}'
Which would properly match the SOLD: 75/101 string.
But is it possible, to do a comparison on the numerator? Such as, find all SOLD: >=75/101?
The comparison number would be a user inputted number via $_POST. I know that REGEXP isn't really meant for comparing numbers, but is there some way to maybe capture the string with regexp, then perform a comparison on the integers some other way?
76/101and123/101, or would you also have to take70/80into account (which is greater than75/101, of course)?