'MySQL Parse href title
I have the following html ahref tags and I'm trying to parse the Title/Link text:
<a href=/golf-video/gary.mp4 target="_blank">Gary Full Swing</a>
<a href=/golf-video/gary2.mp4 target="_blank">Gary Pitch</a>
<a href=/golf-video/gary3.mp4 target="_blank">Gary Putting</a>
So, I need "Gary Full Swing", "Gary Pitch", and "Gary Putting". This is what I have, but obviously, I'm not using LOCATE correctly. Any help is appreciated!
SELECT substring(url, LOCATE ("k\"\>" , url) +3, instr(url, '>')), url
FROM evfull
Solution 1:[1]
SELECT SUBSTRING( url, LOCATE('k">',url)+3, instr(url,'</') ) AS Titles;
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mehrwarz |
