You can stitch elisp into regex replacements (not sure if you can do the same with replace-string
). For instance,
M-x query-replace-regexp \([1-9]\) \,(char-to-string (+ 96 \#1))
should replace single digits 1-9
with the letters a-i
as appropriate.