-1
我想匹配包含强制性单词或重复单词序列的字符串。我甚至不知道我是否可以用Regexp来做到这一点。正则表达式匹配强制性单词和单词序列
例串
No depending be convinced in unfeeling he.
Excellence she unaffected and too sentiments her.
Rooms he doors there ye aware in by shall.
Education remainder in so cordially.
His remainder and own dejection daughters sportsmen.
Is easy took he shed to kind.
强制性的话
Rooms (1x)
Excellence (2x)
Education (1x)
House (1x)
应该返回类似
Success: false
Rooms: 1
Excellence: 1
Education: 1
House: 0
感谢支持
嘿感谢,这正是我一直在现在的编码!谢谢你的时间 – bln
我可以问你smtg其他吗? 如果我有2个强制性的“串”像 - 我的名字 - 命名 和句子,如“我的名字是约翰 我怎么能相信只匹配“我的名字”,而不是“名称”中这个案例? – bln