Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

homersimpson
Contributor II

Can i use regex in Qlik Sense?

Hi,

i want to use regex in Qlik Sense for a selection field for example. One field shows URL´s and i want to cut http://www.domain.com/ and show only the rest from the url.

Is that possible?

regards,

René

1 Solution

Accepted Solutions

Re: Can i use regex in Qlik Sense?

Not regex, but it shouldn't be too hard to cut off the first part: mid(MyUrlHere, index(MyUrlHere, '/', 3)+1) as RestOfUrl

And if you want the last part page1.html?p1=123&p2=abc of an url like http://www.domain.com/news/20160421/a/page1.html?p1=123&p2=abc then you can use:

=mid(MyUrlHere, index(MyUrlHere, '/', -1)+1)


talk is cheap, supply exceeds demand
2 Replies

Re: Can i use regex in Qlik Sense?

Not regex, but it shouldn't be too hard to cut off the first part: mid(MyUrlHere, index(MyUrlHere, '/', 3)+1) as RestOfUrl

And if you want the last part page1.html?p1=123&p2=abc of an url like http://www.domain.com/news/20160421/a/page1.html?p1=123&p2=abc then you can use:

=mid(MyUrlHere, index(MyUrlHere, '/', -1)+1)


talk is cheap, supply exceeds demand
homersimpson
Contributor II

Re: Can i use regex in Qlik Sense?

Great, thanks a lot!

regards,

rené