regex - How to php regular expression get the final part of the url? -
hi, if there have many url address.
http://www.aaa.com/dd/cc/ee http://www.bbb.com/ff/gg http://www.ccc.com/hh/jj/kk/ll
how use php regular expression final part of url? ee
, gg
, ll
it might easier use basename()
instead of regex:
basename('http://www.ccc.com/hh/jj/kk/ll', '/');
Comments
Post a Comment