On 12/2/2015 7:54 AM, michael wrote: > sqlite3 -header flexsql.db "select distinct replace(lower(text),0x0A,'') > from v_term_item where lower(text) REGEXP('.*some_text.*') limit 1;"
You are removing newlines in the wrong spot. Do it on the left-hand side of REGEXP, not in SELECT clause. The reason it doesn't work is that, with most regular expression engines, unless certain flags are used, "." (period) doesn't match newline characters. -- Igor Tandetnik