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 Thanks for your answers. But I only pasted wrong line here. The statement: select distinct text from v_term_item where replace(lower(text),0x0A,'') REGEXP('.*/some_text/.*'); doesn't work like that: select distinct text from v_term_item where replace(lower(text),' ,'') REGEXP('.*/some_text/.*'); with debian and /usr/lib/sqlite3/pcre.so there is one more problem. REGEXP(/'//some_text'/) works like REGEXP(/'//some_text/.*') thanks Michael