RosettaCodeData/Task/Strip-comments-from-a-string/Groovy/strip-comments-from-a-string-1.groovy

2 lines
56 B
Groovy
Raw Permalink Normal View History

2014-01-17 05:32:22 +00:00
def stripComments = { it.replaceAll(/\s*[#;].*$/, '') }