title: When I replace some patterns of a string, can I use a regular expression for the replacement to be replaced?
body: <p>I have a question about replacing string. </p>
  
  <pre><code>string_before &lt;- "aaajohn bbbjohn cccjohn johnaaa johnbbb johnccc"
  string_after &lt;- "aaajane bbbjane cccjane johnaaa johnbbb johnccc"
  </code></pre>
  
  <p>I want to replace above <code>string_before</code> into <code>string_after</code>.
  (pattern is <code>[^ ]+john</code>, replacement is <code>[^ ]+jane</code>.).
  Is there any way to use regular expressions for pattern and replacement, too?</p>