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.
我正在寻找匹配以下模式所需的正则表达式
你好,你好,世界,你好
我只想选择粗体集(包括空间。)
\w+\s\w+
至少一个单词字符,然后是一个空格(或制表符,或者你有什么),然后至少是另一个单词字符。
这是它的样子:
^hello\sworld$
\b[a-zA-Z]+\s[a-zA-Z]+\b
as \w could match numbers also.
\w
\b is a word boundary
\b