title: Regex to remove HTML Tags, empty lines and blank spaces in sql query
body: <p>I have a table that has a column feeback which is a free text from front end. This column has values like -</p>
  <pre><code>FEEDBACK
  -Agent was listening and very attentive.
  
  Agent showed all the houses and gave the right description
  
  Agent was well versed &amp; knew how to speak multiple
  languages
  
  
  
  
  
  &amp;nbsp;
  -&lt;p&gt;Agent was well dressed for the event&lt;/p&gt;
  </code></pre>
  <p>Since this is copy pasted, there are many spaces or empty lines between two lines sometiems that comes in the backend.</p>
  <p>I want to remove all these and show the output like -</p>
  <pre><code>FEEDBACK
  -Agent was listening and very attentive.
  Agent showed all the houses and gave the right description
  Agent was well versed &amp; knew how to speak multiple
  languages
  -Agent was well dressed for the event
  </code></pre>
  <p>For this I use the below query -</p>
  <pre><code>select REGEXP_REPLACE(regexp_replace(  regexp_replace(
      regexp_replace(
        DBMS_LOB.SUBSTR(max(feedback),4000),
        /*
          Replace LF followed by any non-printable sequence that ends with newline
          with single newline
        */
        chr(10) || '[^[:graph:]]*(' || chr(13) || '?' || chr(10) || ')',
        chr(10) || '\1'
      ),
      /*Then replace newline repetitions*/
      '(' || chr(13) || '?' || chr(10) || ')+',
      '\1'
    ),'&lt;.*?&gt;'),'&amp;nbsp;') as feedback
    from dual;
  </code></pre>
  <p>Is there any way I can merge these regex_replace and not use multiple regex_replace to cater to my requirement?</p>