使用 TextMate 中的查找/替换/正则表达式干净地翻译(x 到 y)和(y 到 x)
我想改变这一点:
_(with(new FuListNode )->isList())->shouldBe(true);
_(with(new FuListNodes)->isList())->shouldBe(false);
_(with(new FuTreeNode )->isList())->shouldBe(true);
_(with(new FuTreeNodes)->isList())->shouldBe(false); } }
对此(看看最后的布尔值):
_(with(new FuListNode )->isList())->shouldBe(false);
_(with(new FuListNodes)->isList())->shouldBe(true);
_(with(new FuTreeNode )->isList())->shouldBe(false);
_(with(new FuTreeNodes)->isList())->shouldBe(true); } }
我正在使用 TextMate,如何通过一次查找/替换干净地做到这一点?
I want to change this:
_(with(new FuListNode )->isList())->shouldBe(true);
_(with(new FuListNodes)->isList())->shouldBe(false);
_(with(new FuTreeNode )->isList())->shouldBe(true);
_(with(new FuTreeNodes)->isList())->shouldBe(false); } }
to this (look at the booleans at the end):
_(with(new FuListNode )->isList())->shouldBe(false);
_(with(new FuListNodes)->isList())->shouldBe(true);
_(with(new FuTreeNode )->isList())->shouldBe(false);
_(with(new FuTreeNodes)->isList())->shouldBe(true); } }
I'm using TextMate, how can I do that cleanly with a single find/replace?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用单个搜索和替换无法完成此操作。
It can't be done using a single search and replace.
你能做到吗?
Can you do this?
我从来没有使用过 TextMate,但是你能不能做这样的事情吗?
当然,这涉及 3 次查找替换,而不是您要求的 1 次。
I have never used TextMate but can you not do something like this ?
Of course this involves 3 find-replaces and not 1 as you've requested.