JavaScript regex refactoring
- by JamesBrownIsDead
I'm performing this on a string:
var poo = poo
.replace(/[%][<]/g, "'<")
.replace(/[>][%]/g, ">'")
.replace(/[%]\s*[+]/g, "'+")
.replace(/[+]\s*[%]/g, "+'");
Given the similar if these statements, can these regexs be comebined somehow?