1

我使用 Editplus 来查找替换值。我在 abc_xyz 中有字符串。有没有办法使用editplus正则表达式将其转换为abcXyz(驼峰式)并找到替换功能?

4

2 回答 2

2

The following works in Edit Plus 3.70.

Enter or check the following in the replace dialog.

  • Find what: (\w+)_([[:lower:]]{1})(\w*)
  • Replace with: \1\U\2\E\3
  • Case sensitive: unchecked
  • Regular expression: checked
  • Support \U \L \E: checked

This works fine for the example given.

If you have a variable such as has_three_words then running the replace twice will convert the variable to hasThreeWords.

于 2014-07-09T09:25:26.883 回答
0

编辑加 4.3;

CTRL + U(大写)

CTRL + L(小写)

于 2019-05-01T15:53:54.457 回答