You are here

Search with special characters

How can I search the following string in a text field: '%newline,tabluator,b)%'?

Taxonomy upgrade extras: 

The following example should work for you:

CREATE TABLE spec(txt VARCHAR(255));

INSERT INTO spec values ('bla\tbla\nbla');
INSERT INTO spec values ('\n\tb)');
INSERT INTO spec values ('abc\n\tb)xyz');

SELECT * FROM spec;

SELECT * FROM spec WHERE txt LIKE '\n\tb)';
SELECT * FROM spec WHERE txt LIKE '%\n\tb)%';
SELECT * FROM spec WHERE txt REGEXP '^\n\tb)$';
SELECT * FROM spec WHERE txt REGEXP '\n\tb)';

Shinguzcomment