fork download
  1. class Ideone {
  2. static void main(String[] args) {
  3. def theURL = """http:@<ip-on-lan>
  4. :<port-num> /path/to,/some.asset"""
  5. print 'theURL is: ' + theURL + '\n'
  6.  
  7. if(theURL =~ /[@, ]/){
  8. def tokenizedURL = theURL.split(/\n, /)
  9. print 'tokenizedURL: ' + tokenizedURL + '\n'
  10. }
  11. }
  12. }
  13.  
Success #stdin #stdout 2.39s 126848KB
stdin
Standard input is empty
stdout
theURL is: http:@<ip-on-lan>
        :<port-num> /path/to,/some.asset
tokenizedURL: [http:@<ip-on-lan>
        :<port-num> /path/to,/some.asset]