I have a MySQL table with a VARCHAR field called ‘name’ and a few thousand rows. Each row is formatted like:
‘Some text <1000 – 2000>’
I would like to remove the ‘<1000 – 2000>’ part, leaving just the ‘Hello world’ text. The text and numbers are different for each row. How can this be done with a query? I assume some sort of regular expression.
Any help is appreciated
Use
INSTRandREVERSEto get the position of the<character then remove it by index: