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}

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

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 14,860 points
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
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
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
• 14,860 points
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
• 14,860 points
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
• 14,860 points
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,220 points
0 votes
1 answer

Reset filters in Tableau

I understood your question (I hope so!). ...READ MORE

answered Mar 29, 2018 in Tableau by QueenBee
• 1,810 points
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
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

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.