i want to replace a word in a string:
Input: "left.position.left = leftContent.left.posleft"
Output: "a.position.left = content.left.posleft"
Before "left" there shouldn´t be [a-zA-Z0-9.] and behind there shouldn´t be [a-zA-Z0-9].
This is my code I wrote so far:
"left.position.left = leftContent.left.posleft".replace(new RegExp("left(?![a-zA-Z0-9])", "g"), "a")
But it returns:
"a.position.a = leftContent.a.posa"
Could anybody help me?