清除特定字符后左边的 14 个字符和右边的 "x"
Clear both the left 14 characters and "x" right, after a specific character
我有一个 mysql table 记录如下:
<font size=1>ANGRY BIRDS 2<br>Thurop Van Orman, John Rice (USA, Finland)<br>5/9/2019 – Spentzos Film</font>
<font size=1>THE FAVORITE<br>Giorgos Lanthimos (USA, UK, Irland)<br>5/9/2019 - Feelgood Ent</font>
我需要的是只保留电影的标题清除所有不需要的左右字符
ANGRY BIRDS 2
THE FAVORITE
我试过了
SUBSTR(`Title`, 14)
和
SUBSTRING_INDEX(`Title`, '<br>', 1)
我也试过将 Leading 和 Trailing 结合在一行中,例如
TRIM(Leading '<font size=1>' FROM `tbl.`Title`),
trim(trailing from `tbl`.`Title`, '<br>', 1)
但是没用
是否可以得到我需要的结果?
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(`Title`, '<', 2), '>', -1)
我有一个 mysql table 记录如下:
<font size=1>ANGRY BIRDS 2<br>Thurop Van Orman, John Rice (USA, Finland)<br>5/9/2019 – Spentzos Film</font>
<font size=1>THE FAVORITE<br>Giorgos Lanthimos (USA, UK, Irland)<br>5/9/2019 - Feelgood Ent</font>
我需要的是只保留电影的标题清除所有不需要的左右字符
ANGRY BIRDS 2
THE FAVORITE
我试过了
SUBSTR(`Title`, 14)
和
SUBSTRING_INDEX(`Title`, '<br>', 1)
我也试过将 Leading 和 Trailing 结合在一行中,例如
TRIM(Leading '<font size=1>' FROM `tbl.`Title`),
trim(trailing from `tbl`.`Title`, '<br>', 1)
但是没用 是否可以得到我需要的结果?
SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(`Title`, '<', 2), '>', -1)