我试图使用正则表达式来提取一个包含单词“R&D”的句子。
我的密码是
**\s[^.?!]*R&D[^.?!]*[?.!]**
我希望得到The third quarter R&D spending was 2.4 million, up approximately 100,000 from Q2 levels. SG&A expenses were 3.4 million, down 200,000 from Q2.
我得到了The third quarter R&D spending was 2.
Tags:
可以用
[\w\W]
环绕R&D
,以匹配所有字母数字和非字母数字字符:输出:
相关问题 更多 >
编程相关推荐