Groovy web console

subscribe to the feed Subscribe
to this
site

Normalise whitespace

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