Tag Archives: groovy

CamelCaseString to Space Separated String

groovy> print ‘CamelCaseString’.replaceAll(/([A-Z][a-z]*)/, ‘$1 ‘).trim()Camel Case String There is probably a better regex approach that does not a space to the final word, and thus remove the need for a trim, but this is quick and easily embeddable anywhere, for … Continue reading

Posted in Code Snippets, Groovy | Tagged , , , | Leave a comment