REGEXP on thats why or that's why
Attempting to do a select using REGEX开发者_StackOverflow社区P to get rows where column is either thats why OR that's why
select * from table_name where column REGEXP 'that\'?s why'
Any help appreciated!
I doubt you need a regexp here.
Try this:
SELECT * FROM table WHERE col = 'Thats why' OR col = 'That\'s why'
Or, if you looking for containing values:
SELECT * FROM table WHERE col LIKE '%Thats why%' OR col LIKE '%That\'s why%'
精彩评论