Groovy web console

subscribe to the feed Subscribe
to this
site

Mutli line regex

Published 5 months ago by mrzasa with tags regex
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def pattern = /\S*/
def string = "123qwaaewawa\r\n432"

match = (string =~ pattern).with { it.find() ? it[0] : null } 

match