パターンを使用して一部の文字列を置き換えようとしていますが、文字列の前にドットがあるかどうかを調べる方法がわかりません。 それはため.some用負および正でなければなりませんそれが結果replaced.stringを与える必要がありますLookbehind javascript regexp
var a = "some.string is replaced and .some.string5 is not"
a.replace(new RegExp("some", "g"), "replaced")
一部が交換されると.some.string5は THX
ない
[javascript regex - look behind alternative?](http:// stac kbeflow.com/questions/7376238/javascript-regex-look-behind-alternative) –