13 Replies Latest reply: Aug 22, 2014 4:58 AM by fac586 RSS

    How do we pass a word in regular expression

    Sruthi Tamiri

      Hi All,

       

        I am new to regular expression, i did some analysis in Google, but not clear to how to achieve the below scenario

      SELECT *
      FROM Icehead tih, head fh
      WHERE  tih.head_id = fh.head_id         
      AND    UPPER (tih.head) LIKE UPPER ('%WANT%') 
      

       

       

      From above Query we are checking a key word as "WANT"

      - Along with "WANT" , we need to pass another key word as "SHELL"

      - Have used or condition operator to above Query as shown below

       

      SELECT *
      FROM Icehead tih, head fh
      WHERE  tih.head_id = fh.head_id 
      and UPPER (tih.head) LIKE UPPER ('%WANTS%') or UPPER (tih.head) LIKE UPPER ('%SHELL%')
      

       

      - Instead of using "or" would like to use regular operator, so in future if any other key word would like to use, then we can pass that word using dynamically process, could some one help me on this.

       

      Regards,

      Sruthitamiri