我如何转换
就像这个截图 https://img.techpowerup.org/200421/test.jpg
Alfred
World
Hello
Example
Google
Testing
到
AlfreD
WorlD
HellO
Example
GooglE
TestinG
我有数百行并想全部转换像这样,谢谢。
答案1
- Ctrl+H
- 找什么:
(\w)(\w*)(\w)
- 用。。。来代替:
\u$1\E$2\u$3
- 查看 环绕
- 查看 正则表达式
- Replace all
解释:
(\w) # group 1, 1rst word character
(\w*) # group 2, 0 or more word characters
(\w) # group 3, last word character
替代品:
\u # uppercased the following
$1 # content of group 1, the 1rst letter
\E # remove uppercase
$2 # content of group 2
\u # uppercased the following
$3 # content of group 3, the last letter
截图(之前):
截图(之后):