Using Regex in Tableau, but only getting Null values.

0 votes
I'm trying to extract in Tableau the first occurrence of part of speech name (e.g. substadjfin) located between { and : in every line from the below snippet:

{subst:pl:nom:m3=18, subst:pl:voc:m3=1, subst:pl:acc:m3=5}
{subst:sg:gen:m3=5, subst:sg:inst:m3=1, subst:sg:gen:f=1, subst:sg:nom:m3=1}
{subst:sg:nom:f=3, subst:sg:loc:f=2, subst:sg:inst:f=1, subst:sg:nom:m3=1}
{adj:sg:nom:m3:pos=2, adj:sg:acc:m3:pos=1, adj:sg:acc:n1.n2:pos=3, adj:pl:acc:m1.p1:pos=3, adj:sg:nom:f:pos=1}
{adj:sg:gen:f:pos=2, adj:sg:nom:n:pos=1}
{fin:sg:ter:imperf=5}


I use the following regular expression: {(\w+):(?:.*?)}$. Unfortunately my calculated field returns only Null's. Can anyone suggest me what am I doing wrong?
Aug 17, 2018 in Tableau by Naruto
• 710 points
36 views

1 answer to this question.

0 votes

Tableau regex engine is ICU, and there are some differences between it and PCRE.

One of them is that braces that should be matched as literal symbols must be escsaped.

So you can try using this RegEx and let me know if that works for you.
 

REGEXP_EXTRACT([col], '^\{(\w+):.*\}$')

answered Aug 17, 2018 by AwesomeSauce
• 860 points

Related Questions In Tableau

0 votes
1 answer

Return rows with not null values in Tableau

Hi Nithin, You can add a calculated field ...READ MORE

answered Apr 10 in Tableau by Cherukuri
• 17,710 points
146 views
0 votes
1 answer

How can I calculate the median of sales price using 3 variables in Tableau

First let me clarify things for you. ...READ MORE

answered Apr 11, 2018 in Tableau by xyz
• 1,550 points
430 views
0 votes
1 answer

How to ignore null values in your chart?

If you right click on the bar ...READ MORE

answered Aug 20, 2018 in Tableau by Nitish
• 630 points
30 views
0 votes
1 answer

Rank measure values and show percentage of measures in Tableau

Hi Sindhu, 1. First create a table with ...READ MORE

answered Mar 8 in Tableau by Cherukuri
• 17,710 points
105 views
0 votes
1 answer

SQL - update table with null values in row.

Hi Sindhu, Before loading the data and fields from ...READ MORE

answered Apr 2 in Tableau by Cherukuri
• 17,710 points
30 views
0 votes
1 answer

Search values in a sheet for a field and display in tableau

Hi Sindhu, Follow below steps: 1. Create a parameter ...READ MORE

answered Apr 3 in Tableau by Cherukuri
• 17,710 points
44 views
0 votes
1 answer

Find outliers in data using R in tableau

Hi Nithin, Follow the below steps: 1. Connect to ...READ MORE

answered Jun 19 in Tableau by Cherukuri
• 17,710 points
26 views
0 votes
1 answer

Forecast using R in Tableau

Let me explain using example forecast of profit ...READ MORE

answered Jun 20 in Tableau by Cherukuri
• 17,710 points
26 views
0 votes
1 answer

Want to hide the Bar for Grand Total in the bar chart in Tableau

Tableau treats the whole visualization uniformly.  If you ...READ MORE

answered Aug 10, 2018 in Tableau by AwesomeSauce
• 860 points
405 views
0 votes
1 answer

How to Split a Measure in Tableau?

Have you tried using an IF statement: IF ...READ MORE

answered Aug 14, 2018 in Tableau by AwesomeSauce
• 860 points
64 views