title: Find text in innermost curly brackets starting with word with given substring
body: <p>Consider the following text:</p>
  
  <pre><code>{\Largefont\it Hello world!} Some text. {   \Hugefont \sl Thanks.}
  </code></pre>
  
  <p>I am trying to write a regular expression which will:</p>
  
  <ol>
  <li>identify innermost curly brackets in the full text, and</li>
  <li>check if the first word in the identified block of text starts with '\' and has a substring 'font' in it.</li>
  </ol>
  
  <p>The regex</p>
  
  <pre><code>re.compile(r'\{\s*[^{}]+\}')
  </code></pre>
  
  <p>does the first part of the job. How do I accomplish the second part? In particular, I do not want <code>\Largefont\it</code> to be treated as a single word but rather as two separate words <code>\Largefont</code> and <code>\it</code>. The expected output is:</p>
  
  <pre><code>{\Largefont\it Hello world!}
  {   \Hugefont \sl Thanks.}
  </code></pre>
  
  <p>Thank you.</p>