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.
我需要一个匹配的正则表达式,它包含所有单词,然后是一个空格,后跟一个冒号
[All alphabets][whitespace][colon]
以下模式可用于 Ruby、Perl、JavaScript、.Net... [a-zA-Z]+\s+:
[a-zA-Z]+\s+:
也许是这样:
[a-zA-Z]+[\W];
这可以像这样匹配:
test ; test2 ;这不起作用但是这个does ; work ;
test ;
test2 ;
does ;
work ;