title: How to replace a character within a matched pattern using ampersand (&)
body: <p>When we match a pattern using sed, the matched pattern is stored in the "ampersand" (&amp;) variable. IS there a way to replace a character in this matched pattern using the ampersand itself ? </p>
  
  <p>For example, if &amp; contains the string "apple1", how can I use &amp; to make the string to "apple2" (i.e replace 1 by 2) ?</p>