I have a regex expression that removes any backslashes from a string unless one of these characters is followed: \ / or}.
It should rotate this line:
foo\bar\\batz\/hi
In it:
foobar\\batz\/hi
But the problem is that it deals with every backslash when it goes. Thus, this rule follows that it removes this first backslash and ignores the second, because it is followed by another backslash. But when he gets to the third, he removes it, because the other does not follow him.
My current code is as follows: str.replace(/\\(?!\\|\/|\})/g,"")
But the resulting string looks like this: foobar\batz\/hi
3- ? , - ? . '\', '\\', '\/' '\}'?
, !:)
, - javascript, , lookbehinds...