Match Number In String

A simple job , match both numbers within a string

Table looks like this:

id word_id (VARCHAR 255)

1 567,676,7878,56764
2 123,543,34
3 567,75,87
4 567,7878,897

This will return row 4 only
select id from video WHERE word_id REGEXP ‘[[:<:]]567,7878[[:>:]]’ = 1

Basically i want to match 567 AND 7878 no matter what position they are in

Leave a Reply

Your email address will not be published. Required fields are marked *