RosettaCodeData/Task/Strip-comments-from-a-string/Groovy/strip-comments-from-a-string-1.groovy
2014-01-17 05:34:36 +00:00

1 line
56 B
Groovy

def stripComments = { it.replaceAll(/\s*[#;].*$/, '') }