In VS Code, the docs for creating user defined snippets mentions some Grammar which includes options for /upcase, /downcase, and /capitalize
/upcase
/downcase
/capitalize
Try this:
"test": { "prefix": "test", // "body": "${1} -> ${1/(.*)/${1:/upcase}/} > ${1/(.*)/${1:/downcase}/}" // simpler version below works too "body": "${1} -> ${1/(.*)/${1:/upcase} ${1:/downcase}/}" }
You need to hit Tab to apply the transformation.