title: How to format f-strings with regex expressions?
body: <p>I have a few strings that were originally concatenated with plus signs and included regex strings. Here's an example:</p>
  
  <pre><code>"Level 4: " + re.sub(r"(\w)([A-Z])", r"\1 \2", talents[1]) + "\n\n"
  </code></pre>
  
  <p>But, I've been meaning to use more proper formatting. I did some research on f-strings and I want to use them here. I tried it this way:</p>
  
  <pre><code>f'Level 4: {re.sub(r"(\w)([A-Z])", r"\1 \2", talents[1])} \n\n'
  </code></pre>
  
  <p>However, my editor is barking at me about expression fragments having backslashes. Are f-strings not the right tool for the job in this case?</p>
  
  <p>Edit:
  As requested by @jwodder, here is the error I'm getting from Python (I'm on 3.6)</p>
  
  <pre><code>SyntaxError: f-string expression part cannot include a backslash
  </code></pre>