Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Trying to only load rows where URL matches regular expression ^domain\.com.
I solved it the way I did not want to with if(WildMatch([PageURL],'domain.com*'),'Yes','No') AS [MainDomain]- I would rather avoid creating a new column.
I Googled the living daylights of "qlik match regex in load" and its variations.
Below is another example of something that does not work:
LOAD
DateOfPageview,
PageURL,
Pageviews
FROM [lib://dataSource.qvd]
WHERE [PageURL] REGEXP '^domain\.com'
(qvd);
Is it possible?
Thank you.
Your suggestions worked, thank you.
Here's the script that worked:
LOAD
DateOfPageview,
PageURL,
Pageviews
FROM [lib://dataSource.qvd]
(qvd)
WHERE [PageURL] like 'domain.com*';
I cannot mark my original question as solved, because this is an answer to a different question.
The "like" operator and the "Wildmatch()" function support wildcard characters "*" and "?". It's good that you could resolve your particular requirement with like.
Regular expression syntax is not currently supported in Qlik Sense out-of-the-box. A couple of possible workarounds when you do need full regex:
1. Use the RegEx web connector https://help.qlik.com/en-US/connectors/Subsystems/Web_Connectors_help/Content/Connectors_QWC/Data-So...
2. Write your own (or borrow) your own RegEx implementation as a Server Side Extension. See https://github.com/RobWunderlich/qcb-qlik-sse
It would be great to see Regex function as native Qlik functions!
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com