title: Remove Whitespace using Erlang Regex
body: <p>I want to remove all the whitespace i..e tabs/spaces/newline chars.</p>
  
  <pre><code>T = {xmlelement,"presence",
                                           [{"xml:lang","en"}],
                                           [{xmlcdata,&lt;&lt;"\n"&gt;&gt;},
                                            {xmlelement,"priority",[],
                                                [{xmlcdata,&lt;&lt;"5"&gt;&gt;}]},
                                            {xmlcdata,&lt;&lt;"\n"&gt;&gt;},
                                            {xmlelement,"c",
                                                [{"xmlns",
                                                  "http://jabber.org/protocol/caps"},
                                                 {"node","http://psi-im.org/caps"},
                                                 {"ver","0.12.1"},
                                                 {"ext","cs ep-notify html"}],
                                                []},
                                            {xmlcdata,&lt;&lt;"\n"&gt;&gt;}]}.
  </code></pre>
  
  <p>I tried the following, but it does not work:</p>
  
  <pre><code>trim_whitespace(Input) -&gt;
  re:replace(Input, "(\r\n)*", "").
  </code></pre>