如何在Eclipse中使用正则表达式将大写字母替换为小写字母? [英] How to replace uppercase letters to lowercase letters using regex in Eclipse?

查看:726
本文介绍了如何在Eclipse中使用正则表达式将大写字母替换为小写字母?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想浏览所有的源代码文件,并用 k_xyyy 替换每一次 k_Xyyy (将 k _ 之后的第一个字母从大写转换为小写)。

I'd like to go through all of my source code files and replace every occurence of k_Xyyy with k_xyyy (switch the first letter after k_ from uppercase to lowercase).

我正在使用eclipse对话框进行搜索并替换多个文件。现在我有正则表达式 \bk _([AZ])

I'm using the eclipse dialog to search and replace multiple files. Right now I have the regex \bk_([A-Z]).

如何指定替换字符串的正则表达式?

How do I specify the replacement string of the regex?

推荐答案

这是不可能的。或者使用Eclipse的重新分解功能,或者一次更换一个:

That is not possible. Either use Eclipse's re-factoring functionality, or replace them one at a time:

regex       : \bk_A
replacement : k_a 

regex       : \bk_B
replacement : k_b 

...

regex       : \bk_Z
replacement : k_z 

这篇关于如何在Eclipse中使用正则表达式将大写字母替换为小写字母?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆