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
714 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, 2019 in Tableau by Cherukuri
• 33,030 points
5,590 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 12, 2018 in Tableau by xyz
• 1,560 points
6,612 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
2,672 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, 2019 in Tableau by Cherukuri
• 33,030 points
3,915 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, 2019 in Tableau by Cherukuri
• 33,030 points
3,657 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, 2019 in Tableau by Cherukuri
• 33,030 points
802 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 20, 2019 in Tableau by Cherukuri
• 33,030 points
1,962 views
0 votes
1 answer

Forecast using R in Tableau

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

answered Jun 21, 2019 in Tableau by Cherukuri
• 33,030 points
1,684 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
3,452 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
1,767 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP