gandenkohkono 3 Posted January 14, 2018 Report Share Posted January 14, 2018 How to get last part of url and replace - with space.Example : i put this url in ui text box: http://domaiexample.com/awesome-images-of-a-parrot/ ui text box("URL :",#url) set(#lasturl,$find regular expression(#url,"^(.*[\\\\\\/])"),"Global")So, i will get awesome images of a parrotThanks Quote Link to post Share on other sites
pash 504 Posted January 15, 2018 Report Share Posted January 15, 2018 try set(#url,"http://domaiexample.com/awesome-images-of-a-parrot/","Global") set(#url,$replace regular expression(#url,"\\/$",""),"Global") set(#lasturl,$replace regular expression(#url,".*\\/",""),"Global") alert(#lasturl) 1 Quote Link to post Share on other sites
gandenkohkono 3 Posted January 15, 2018 Author Report Share Posted January 15, 2018 try set(#url,"http://domaiexample.com/awesome-images-of-a-parrot/","Global") set(#url,$replace regular expression(#url,"\\/$",""),"Global") set(#lasturl,$replace regular expression(#url,".*\\/",""),"Global") alert(#lasturl) Thanks pash. Because, i can't understand using regex. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.