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.
简单的正则表达式问题。你的回答将帮助我理解未来的表达方式......
假设我有这个字符串“Send today @ 1 USD to 13.6512 MXN”,我想定位 USD 和 MXN。是否有一个正则表达式可以同时返回两个值?
我现在没有办法自己检查它,但是 /[AZ]{3}/ 这样的东西应该可以工作,因为它们都是 3 个字符长。
编辑:删除 ^ 和 $ 就像 mason81 说的。