查找&替换为netbeans中的正则表达式
我正在寻找一个正则表达式,可以在netbeans中查找并替换所有文本“anytext”为“anything”,某些符号也包含此文本。我已经为单个文件完成了一段时间,但现在我想更改我的应用程序中的所有内容&我正在努力把它做好。
I'm looking for a regular expression that can find and replace all the text "anytext" with "anything" in netbeans, some of the symbols also contain this text. I've done it a while back for a single file but now I want to change everything in my application & I'm struggling to get it right.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需使用查找& Replace 将“anytext”的所有实例替换为“anything”。这和正则表达式 find & 没有区别。替换,因为不存在可以使用正则表达式轻松利用的模式。在这种情况下没有区别。根据您的评论,您仍然必须手动输入要替换的单词以及将替换它的单词。
我认为您有点误解了正则表达式的含义。
Just use find & replace to replace all instances of "anytext" with "anything". There is no difference between this and a regex find & replace, because there doesn't exist a pattern that can be easily exploited using regex. There is no difference in this case. Based on your comment, you still must manualy enter the word you want replaced and a word that will replace it.
I think you have misunderstood a bit what regular expressions are all about.
您在寻找这样的东西吗?它不会在单词中抓住它吗?
Were you looking for something like this? Where it wouldn't grab it inside word?