Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以用来LOCATE获取字符的索引,例如.in www.google.com。因此,我可以使用 substring 来删除第一个之前的所有内容.。
LOCATE
.
www.google.com
有没有办法找到最后一个 /?
/
这样我可以test.htm脱身http://www.example.com/dev/archive/examples/test.htm吗?
test.htm
http://www.example.com/dev/archive/examples/test.htm
我不想说第 6 个斜线,我想说最后一个斜线。这可以做到吗?
使用 substring_index
select substring_index('http://www.example.com/dev/archive/examples/test.htm','/',-1)