查找&替换为netbeans中的正则表达式

发布于 2024-10-03 03:56:10 字数 123 浏览 0 评论 0原文

我正在寻找一个正则表达式,可以在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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

離人涙 2024-10-10 03:56:10

只需使用查找& 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.

拿命拼未来 2024-10-10 03:56:10

您在寻找这样的东西吗?它不会在单词中抓住它吗?

\banytext\b

Were you looking for something like this? Where it wouldn't grab it inside word?

\banytext\b
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文