I'm struggling with the basics of query-replace-regex after reading the manual.
I'm trying to replace lots of citations formatted like this:
#123213213, foo bar
#123213213\, foo bar
the numbers vary from instance to instance and can be of any length. They always start with a #. Foo bar can be numbers or text. I always want to replace only:
, --> \,
without changing the numbers or the foo bar.
I've tried emacs' regex builder, and I'm stuck at
which doesn't work because it selects too much before the bit I want.
Ideally, I'm looking for an answer that explains how it works.
Thanks for your help!