Hi, I am trying to find all urls in a list that have a subdomain domain by using \..*\. which finds all urls with a dot domain dot. (btw this does not really work for domain.co.uk but I don't need that right now.)
This works great in the regex tool but if try to use in the regex_match formula it does not find those domains.
It seems the engine works differently between tool and formula?
What regex would i use the formula to get the same results as the regex tool?
Thanks,
Anthony
Solved! Go to Solution.
REGEX_MATCH([field1],".+[.].+" )
that should find anything followed by a '.' followed by more stuff
Why does the syntax need to be differnet?
Btw this worked REGEX_MATCH([Location on Site],".+[.].+[.].+" )
to find all store.domain.com's vs store.com
Anthony,
I'm a little bit confused. I tested a regex tool (match) and a formula and got identical results. See pic/module. can you show me where it goes wrong for you? Also, I only match store.domain.com with your expression.
Parse, replace, match ...
With the functions of regex_replace I get the same results as REGEX tool with choice of replace, same with match.
Parse is a different animal. :)
Hi Anthony,
You can still mimic the result of the Parse tool (using the Output Metthd="Parse" ) in a formula by using regex_replace rather than regex_match:
yes, Parse and Match are somewhat different and there is no Regex_parse function as this is the role of the parse tool.
Cheers,
Michel
Ok, technically I was not trying to parse as I just wanted to filter all subdomain urls from the non www. subdomains so I could go to the next step.
I use the regex tool quite a bit and was surprised to find out the same regex does not work in formula match. Does not help I started learning regex 20 years ago in VIM which again uses a different syntax.
Anyway, thanks for the help - as always I can usually find a hack around what I am trying to accomplish no matter how hard alterxy tries to stop me.
I need help with a REGEX formula. I want to take a column called Quarter in the following string format 2008Q1 and I want to change to the following format date format (Month, yyyy), so 03, 2008 for 2008Q1 so that I can use the DateTime format to convert to DateTime. So, 2008Q2, would be 06, 2008, 2008Q3 would be 09, 2008, and 2008Q4 would be 12,2008.
Thanks,
Derreck