I'm trying to replace some string using pattern but I have no idea how to check if there is dot before string. It should be negative for .some and positive for some
var a = "some.string is replaced and .some.string5 is not"
a.replace(new RegExp("some", "g"), "replaced")
It should give result replaced.string is replaced and .some.string5 is not THX