2 Replies Latest reply on Sep 7, 2018 8:43 PM by Ankit Bansal

    Regular Expression Extract does not return the expected Value.

    M Welch



      I'm trying to use regular expressions in Tableau 10.1 using the following pattern:




      This all works perfectly in regexr, as well as in python and java. When I try and use the regex extract function it doesn't display the matching pattern, yet when I use regex match function it returns a Boolean value of true.


      I'm completely confused by this, since it is the extract function failing only.


      REGEXP_MATCH([F1], '[ACEMPQTVZ][CDJL][012345AMCS][0123456789CLNSX][0-9][0-9][0-9][0-9][0-9]([a-c])?([0-9])?([a-c])?')


      Column: F1

      Value: EJ1600735EN


      Returns true




      REGEXP_EXTRACT([F1], '[ACEMPQTVZ][CDJL][012345AMCS][0123456789CLNSX][0-9][0-9][0-9][0-9][0-9]([a-c])?([0-9])?([a-c])?')


      Column: F1

      Value: EJ1600735EN


      Returns [Blank]


      Am I missing something, as it seems strange one function is recognising a matching string, and the other isn't.