Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一张桌子
我使用一个对话框在电子表格中查找和替换。我想一次找到所有项目。如何为此使用正则表达式?
谢谢!
你不能像你想的那样简单地做你想做的事。这是我能想到的下一个最佳选择。
1)在前瞻中包含每个组合,因此它只会匹配您想要的字符串(为简洁起见,我跳过了一些组合)
(?=\bmama|rama|drama\b)(?=\brama|mama|drama\b)(?=\bdrama|mama|rama\b).*
2)在前瞻中单独列出单词,但它会匹配包含您在前瞻中列出的单词的整行。
(?=.*\bmama\b)(?=.*\brama\b)(?=.*\bdrama\b).*
这和我想的一样好:)