title: Use Regex to remove RTF formatting in Android
body: <p>I am trying to obtain the plain text from a string containing <code>RTF</code> formatting.<br>
  For example, I have:  </p>
  
  <pre><code>originalText = {\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}} \viewkind4\uc1\pard\f0\fs20 the temp is forty degrees\par}
  </code></pre>
  
  <p>and I want to obtain:</p>
  
  <pre><code>plainText = the temp is forty degrees 
  </code></pre>
  
  <p>I found the following <em>Regex</em> online: <code>({\)(.+?)(})|(\)(.+?)()</code></p>
  
  <p>So I tried this but it just gave me back the original expression: </p>
  
  <pre><code>        pattern = "({\\)(.+?)(})|(\\)(.+?)(\b)";
          plainText = originalText.replace(pattern,"123");
  </code></pre>