Discussion Board for collaboration related to QlikView App Development.
Has anybody worked with Regular Expresions in Qlik Sense?, I already know 'RegEx' does not exist in Sense, nevertheless I need to evaluate the content of diferent dimensions into my data model, for instance:
In order to create a flag , I need to evaluate the first 4 characters are capital letters, the next 6 characters are numbers, the next 2 are lower case and the last 2 are numbers.
I´d really appreciate your help.
Thanks in advance.
What is the issue here? May be look the use RegEx
Hello, thanks for answering, however is not what I need.
I already work using regular expressions in Qlik View, the issue is working them in QlikSense because in Qlik Sense does not exists RegEx and I have not found how to evaluate the content of my dimensions in Sense.
True, I thought your initial group seems Qlikview. Anyway you may move this topic into Qliksense Branch
Hi Araceli, maybe you can try this:
Do while vFirst<=4
if(ord(mid(RFC,$(vFirst),1))>= 65 and ord(mid(RFC,$(vFirst),1))<= 90,1,0) as Prove
//ord = code ascci, hence the search is from 65 to 90
//mid = returns the part of the string, in this case, letter by letter
Do while vSecond<=10
if(mid(RFC,$(vSecond),1)>= 0 and mid(RFC,$(vSecond),1)<= 9,1,0) as Prove2
//here the function ord is not necesary, and the search is between 0 and 9
At the end, you get 0 if one condition is not true, for example:
RFC Prove Prove2
%DOG999999XXX 0 1
MEMM444444LLL 1 1
MEMM45M678KKK 1 0
I hope I've helped you
Hi again Araceli.
I was thinking about your problem and my little solution too. I did many test with different cases,
and my solution it's wrong But I thought something simpler, only you need use several functions:
if(len(PurgeChar(mid(rfc,1,4),'_%&@()0123456789'))<4 or len(KeepChar(mid(rfc,5,6),'0123456789'))<6 or len(PurgeChar(mid(rfc,6,3),'_·$%&'))<3,0,1) as prove,
You get 0 if you have at leats a wrong character
A bit late, but a RegEx connector is included in the Qlik Web Connectors package. I have tested it, and it validates the RFC as you need to.
You can also vote for this idea.