quick question: my pattern is an svg string and it looks like l 5 0 l 0 10 l -5 0 l 0 -10 To do some unittest comparison against a reference I need to ditch all
l 5 0 l 0 10 l -5 0 l 0 -10
You can try a negative lookahead, avoiding the start of the string:
/(?!^)l/g
See if online: jsfiddle