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.
我正在尝试匹配任何具有([a-zA-Z0-9$\s]*)但我也想在该组中匹配的字符串 an=和 a>但前提是它们一起出现=>
([a-zA-Z0-9$\s]*)
=
>
=>
我试过这个,但它似乎不起作用([a-zA-Z0-9$\s]|=>*)
([a-zA-Z0-9$\s]|=>*)
有没有办法在一个正则表达式和一个捕获组中做到这一点?
just move your asterisk outside the brackets...
([a-zA-Z0-9$\s]|=>)*
add another pair of brackets to capture it all...
(([a-zA-Z0-9$\s]|=>)*)