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?