Atom Editor: RegEx replace to uppercase/lowercase

后端 未结 4 667
刺人心
刺人心 2020-12-29 19:16

I\'m trying to replace some characters in a string with their uppercase/lowercase equivalents in Atom Editor.

Let’s say I have the string:

some:test:         


        
4条回答
  •  礼貌的吻别
    2020-12-29 20:20

    A straight-forward kind-of solution within the framework of plain Regex would be to do the replacement for each character separately. This is probably not practical (if you have to trigger each replacement manually), but it works.

    Search for all lower-case 'a' at the beginning of each word, replace it by the upper-case 'A'. Then 'b' for 'B', ... until you have all characters relevant for your target language/character set.

提交回复
热议问题