regex - syntax for specifying matched digit string in Emacs replace-regexp? -


in emacs, i'm trying prepend instances of digits text string, every </a>1</h2> become </a>chapter 1</h2> , on.

i'm able find matches using regexp: </a>\([0-9]+\)

how specify existing matched digit in replacement string, rather entire string?

you've correctly used \( , \) enclose digits in capture group can write replacement string \1 (since first capture group) in regex. replacement string be

</a>chapter \1 

Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -