3 Replies Latest reply on Oct 3, 2018 7:31 PM by swaroop.gantela

    Regex_Extract in Tableau Prep

    Benjamin Hart

      I am trying to extract substring from a string using Regex_Extract. The strings look like this:

       

      2.5-145

      2.3-123

      3.6-143

      5.8-145

      2.x-117

      4MW-567

      ODR Blades change out 118

       

      I only want to return the bold, so, I wrote the following expression:

       

      REGEXP_EXTRACT([String],'(\d+(.|M)+(\d|W|x)+[-]+\d+\d+\d)')

       

      It works on https://regexr.com/ but is only returning nulls in Prep.

       

      Thoughts?