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.
我试图使用不情愿的量词(。*?),但这似乎不适用于 POSIX 正则表达式。POSIX 不支持不情愿的量词吗?如果没有,是否有任何替代方案。我也无法在 POSIX 中获得积极的前瞻性工作。也不支持吗?任何帮助,将不胜感激。谢谢。
环顾和非贪婪量词是 Perl 正则表达式的功能。它们在 POSIX 中不存在。
至于替代方案,解决方法可能是可能的,但这取决于您要匹配的确切内容。没有通用的解决方案。