Example of string:
<a href="#" data-html="<input type="text" data-html="<input type="text">">"></a>
The target:
<a href="#" data-html="<input type="text" data-html="<input type="text">">"></a>
I tried:
var string = '<a href="#" data-html="<input type="text" data-html="<input type="text">">"></a>';
string.replace(/"+(.?)"+/g, function(s) {
return '"' + s.slice(1, s.length).slice(0, -1).replace(/"/g, '"') + '"';
});
Such as I'm noob with regex I need your help :)
P.S. we can't use lookahead & lookbehind (javascript)