Direkt zum Hauptbereich

Posts

Es werden Posts vom Juli, 2017 angezeigt.

I want to understand RegEx! (Part2)

It is already two weeks ago since my last blog post. This two weeks I spent in Scotland. It is a very beautiful country with unforgettable landscaps. However, it is not the topic I want to talk about. In this blog I will continue the topic about the RegEx and its using in Tableau. Tableau offers you four different uses cases of RegEx: REGEXP_EXTRACT If you have data like this: aspirin_20_mg_oral_tablet and you would like to extract onliy 20_mg. What I do is I check my RegEx on this web site: http://regexr.com/ If it is ok, put this RegEx in Tableau function: REGEXP_EXTRACT([0-9][0-9]+[_]+[a-z]+) and extract all "20_mg" REGEXP_EXTRACT_NTH The same like the function before but here you can limit your extract to Nth index. Image you have data like this: aspirin_20565435 and you want to extract only "aspirin_20". So your formula should be: REGEXP_EXTRACT_NTH([a-z]+[0-9], 2) REGEXP_MATCH It is very easy one: Using REGEXP_MATCH we can find if ...