Groovy web console
Subscribe
to this
site
get last segment of url (via #groovywebconsole)
Tweet
this
script
get last segment of url
Published 12 months ago by
musketyr
Actions ➤
Edit in console
Back to console
Show/hide line numbers
View recent scripts
def url = 'http://domainname.com/ticket/ticketnumber' def ticket = url[(url.lastIndexOf('/')+1)..-1]