Groovy web console

subscribe to the feed Subscribe
to this
site

Normalise whitespace

Published 2 years ago by Andy Duncan with tags strings
Actions Execute script  ▶ Edit in console Back to console Show/hide line numbers View recent scripts
def s = """1  2\t3
4"""
s.replaceAll(/\s+/, ' ')