Search for text between delimiters in MySQL

前端 未结 11 2411
情歌与酒
情歌与酒 2021-02-08 03:39

I am trying to extract a certain part of a column that is between delimiters.

e.g. find foo in the following

test \'esf :foo: bar

So in the above I\'d wa

11条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-08 03:55

    This should work if the two delimiters only appear twice in your column. I am doing something similar...

    substring_index(substring_index(column,':',-2),':',1)
    

提交回复
热议问题