Test content:
http://b174.photo.store.qq.com/psb?/V10CD1yE07IujV/embkzb1rzhy56uejjcdlosr3hhqy53jbobtl7zh9lug!/c/ Dk4aaaaaaaaa&bo=faf0aaaaaaafaco!&rf=mood_app
https://www.zhihu.com/question/37415530/answer/118246241?group_id=751055135773331456
http://zhidao.baidu.com/question/185463932.html
http://billmill.org/bloomfilter-tutorial/
http://music.163.com/
Test results:
Total 3 matches found:
Dk4aaaaaaaaa&bo=faf0aaaaaaafaco!&rf=mood_app
118246241?group_id=751055135773331456
185463932.html
Regular Expressions:
[^/]+(?!. */)
Analytical:
[^/]+ is a string that matches any length, and the string does not contain characters/, it can match the/split string to the full.
. */denotes any string that ends with a/, can be matched to a string followed by A/, preceded by a?!, and then wrapped in parentheses to exclude. (?!. */).
The entire expression is meant to match any length of the string that does not contain/, and the string that ends with a/end is excluded.
Match the last backslash/trailing content in the URL URLs with regular expressions