Regex to replace values that include part of match in replacement in sublime?

The replacement expression is:

\$\1\u\2
  • \1, \2 are the captures (or $1, $2)
  • \u up-cases (see the Replacement String Syntax section).

See the Regular Expressions chapter (in the TextMate docs) for more information.

There’s already a package that does this, and more:

  • Brief blog about CaseConversion
  • CaseConversion package

Leave a Comment