What is the difference between REGEXP_MATCH() and REGEXP_EXTRACT()?

0 votes
What is the difference between REGEXP_MATCH() and REGEXP_EXTRACT()?
Apr 1 in Tableau by Nithin
23 views

1 answer to this question.

0 votes

Hi,

REGEXP_MATCH() AND REGEXP_EXTRACT() are both used for pattern matching, bu the main difference is that REGEXP_MATCH() after matching would return true or false to check if field/string matches with pattern whereas REGEXP_EXTRACT() would return the string that matches the pattern as a output.

REGEXP_MATCH([Order ID],'AE-\w*-\w*-\w*') return True/False i.e Boolean Values.

REGEXP_EXTRACT([Order ID],'AE-\w*-\w*-\w*') return sub-string from String/Field. It can be used as a field separately to view data which has matched the pattern.

Both have the same syntax.

Hope this helps you.

answered Apr 1 by Cherukuri
• 17,630 points

Related Questions In Tableau

0 votes
1 answer

What is the difference between a Bin and a Set?

The fundamental difference between bins and sets ...READ MORE

answered Aug 16, 2018 in Tableau by Naruto
• 710 points
23 views
0 votes
1 answer
0 votes
1 answer

How to return the string between 5th and 6th Spaces in a String

In Tableau 9 you can use regular ...READ MORE

answered Jun 26, 2018 in Tableau by Atul
• 5,530 points
36 views
+1 vote
1 answer

How can I find the time difference between two columns

Based on the data you showed, I'm ...READ MORE

answered Jul 24, 2018 in Tableau by Atul
• 10,240 points
27 views
0 votes
1 answer

How to use REGEXP_MATCH() ?

Hi, Create a calculated field with code like ...READ MORE

answered Apr 1 in Tableau by Cherukuri
• 17,630 points
12 views
0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
1,310 views
+1 vote
1 answer
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
48 views
0 votes
1 answer

days difference between completed and estimated completion time.

Hi Prakash, Use ISNULL() or ZN()  to find ...READ MORE

answered May 8 in Tableau by Cherukuri
• 17,630 points
10 views
0 votes
1 answer

What is the value shown in tooltip when hovered over trend line?

Hi, When you hover over the trend line ...READ MORE

answered May 17 in Tableau by Cherukuri
• 17,630 points
25 views