を抽出するためのJavaScript、Iは1つの請負ワードを有する2ワード請負及び(STR2)を有する文(0009)を有します。私は2単語請負正規表現は、例えば、特定の単語を含むすべての文2回
var str1 = "Before hiring your chosen contractor, be certain to get a solid estimate in writing because not all contractors are honest and upfront in their quoting of costs."
var str2 = "Before hiring your chosen contractor, be certain to get a solid estimate in writing."
1ワード契約者については、この正規表現/ [^。?!] *(?:[。?、\ s!])契約者(?= [\ s! 2} [^。?!] * [。?!]/gi – David
これまでに何を試みましたか? –
また、文章を検索する必要がありますか、またはすべての文字列は1文ですか? –