title: Regex Expression in single SQL query
body: <p>If an input string is in the format <strong>String#String</strong> or <strong>String#String;String#String</strong> where String can have any number of Capital letter alphabets, underscore,then it should return <strong>Y</strong> else it should return <strong>N</strong>.  </p>
  
  <p>How can it be done using Regex in PL/SQL only in single SQL query?<br>
  (P.S. not using PL/SQL procedures/function.)</p>
  
  <p>Example:- If input string is <strong>"CASISA#Y"</strong> or <strong>"INVOPT#LUMREG;LUMSUM#2000;REGSUM#8000"</strong>, a 'Y' should be returned else an 'N' should be returned.
  Note - Please do not build a PL/SQL procedure to accomplish this instead it should be just a SQL that makes use of oracle Regular expression functions.<em>*</em></p>