I'm using regex to remove keypresses from a string thats being inputed from a telnet client (node.js) but my regex expression, input.replace(/\[(B|C|D|A)/gm,"");
seems to be having some weird effects
string
being my input is that snapshot.
How do I remove those empty strings regex is putting at the beginning or is there a better way to write the expression so that they aren't created?
here's the input string http://s21.postimg.org/91e01id13/input.png as a string its
"[D[A[C[D[B[D[A[B[C[Dhhh
"
Aucun commentaire:
Enregistrer un commentaire