Groovy web console

subscribe to the feed Subscribe
to this
site
get last segment of url (via #groovywebconsole)
tweet this snippet Tweet
this
script

get last segment of url

Published 2 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]