I can't find the solution to this anywhere, but I think it's because I don't have the terminology right.
I have this:
var text = "Foo:Bar"; // I want -> "Foo: Bar"
text = text.replace(new RegExp("Foo:[a-z]", "ig"), "Foo: ");
I have lots of foos, and I want to add a space after the colons. I only want to do it if I can tell the colon has a letter right after it. However, when I do the above, I get:
// -> "Foo: ar"
How do I take that [a-z] match, and throw it into the end of the replace?
text = text.replace( /Foo:([a-z])/ig, 'Foo: $1');