class Ideone {
static void main(String[] args) {
def theURL = """http:@<ip-on-lan>
:<port-num> /path/to,/some.asset"""
print 'theURL is: ' + theURL + '\n'
if(theURL =~ /[@, ]/){
def tokenizedURL = theURL.split(/\n, /)
print 'tokenizedURL: ' + tokenizedURL + '\n'
}
}
}
Y2xhc3MgSWRlb25lIHsKICAgIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIGRlZiB0aGVVUkwgPSAiIiJodHRwOkA8aXAtb24tbGFuPgogICAgICAgIDo8cG9ydC1udW0+IC9wYXRoL3RvLC9zb21lLmFzc2V0IiIiCiAgICAgICAgcHJpbnQgJ3RoZVVSTCBpczogJyArIHRoZVVSTCArICdcbicKCiAgICAgICAgaWYodGhlVVJMID1+IC9bQCwgXS8pewogICAgICAgIGRlZiB0b2tlbml6ZWRVUkwgPSB0aGVVUkwuc3BsaXQoL1xuLCAvKQogICAgICAgIHByaW50ICd0b2tlbml6ZWRVUkw6ICcgKyB0b2tlbml6ZWRVUkwgKyAnXG4nCiAgICAgICAgfQogICAgfQp9Cg==