RosettaCodeData/Task/Strip-comments-from-a-string/Groovy/strip-comments-from-a-string-1.groovy
2023-07-01 13:44:08 -04:00

1 line
56 B
Groovy

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