Mysql regex matches any character except line break

I would like to use regex using the regexp command in mysql query. The regular expression contains the rule of any character except line break.

SELECT * FROM column regexp 'EXP1.*=*.*EXP2'

But mysql seams to handle. * like any character, including line break

Any ideas on how to change the regex to match any character except line break

thank

+4
source share
1 answer

Depending on the line ending style, you can use [^\n]*to match anything other than lines, or [^\n\r]*to match anything other than lines and carriage.

+11
source

Source: https://habr.com/ru/post/1532700/


All Articles