mlsamuelson.com

RLIKE - use Regex in MySQL SELECT statements

SELECT title FROM periodicals WHERE title RLIKE '^National .* Weekly$';

match all rows where title starts with 'National' and ends with 'Weekly' with anything in between

Matches
National Work Workers Weekly
National Policy Review Weekly
Nationalist Critique Weekly

Not
National Lampoon Magazine
Mountaineering Weekly

Find Me Around

User login