0

I am trying to get year (yyyy) from text/string in the column "title" but for some reason can't get following query to work:

select substring(title,LOCATE(REGEXP '[(][0-9]{4}[)]',title),4) from videos

title column has following values:

abc abc 2001 abc
xyz (2002) xyz

Any assistance will be appreciated.

shmosel
  • 49,289
  • 6
  • 73
  • 138
calmsoul
  • 17
  • 5

0 Answers0