Raghav
Raghav

Reputation: 9630

Converting C# regex to JavaScript regex

In C# I am using this regex:

 string pattern = @"(?<!"")\:([^\:]*)\:";

and it is working fine but when I try to use it in JavaScript it gives Syntax error:

var pattern = /(?<!"")\:([^\:]*)\:/g;

Can you let me know the issue with that regex with JavaScript?

Upvotes: 1

Views: 138

Answers (1)

Charlie
Charlie

Reputation: 1293

JavaScript do not support Zero-width negative lookbehind assertion.

Upvotes: 1

Related Questions