String # 1:
/string/morestring/thename
String # 2:
/string/morestring/thename/
Regex:
[^/]*[/]*$
The above regex matches both last segments...
How can the regex match only the last word on both "thename" AND "thename/", with or without final slash?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…