Want to get last value using regex having multiple slashes -


i have string:

//abc.net/v1/hello/16546515646/abcdefgh 

i want value abcdefgh above using regex.

i using hello(\/.*)(\/.*), gives me string hello/16546515646/abcdefgh

can provide regex how abcdefgh?

you can use regex:

[^\/]+$ 

regex demo

breakup:

[^\/]+    # match not / $         # followed end of line 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -