I’ve never been very good with regular expression – and I’m looking for someone to help building a simple regex for MYSQL that queries DB for the following pattern:
Could be anything here (YYYY)
Basically – I want to be able to query the DB to return all rows that match that pattern.
Sample Query:
SELECT title from myTable where title REGEX '$(YYYY)$'
Any advice or help on this?
UPDATE: The YYYY entry is a Year, like 2011 or 2010. Sorry for the confusion.
This should do the trick:
(By the way, it’s
REGEXPwith a P)