Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
Pulkit_Thukral
Partner - Creator II
Partner - Creator II

Wildmatch to exclude starting and ending characters based on content type

Hi All,

i have written following code- Wildmatch( Description,'*' & [Machine_Name] & '*').

Data can have following values,

Description:-

123456

612345

abcde

eabcd

abcd e

1234 5

1234cd

Machine name

1234

abcd

With my code, it will pick in following way:-

123456, '*1234*' =Match -This is not required (No Digits after matched substring)

612345, '*1234*' =Match -This is not required (No Digits before matched substring)

abcde, '*abcd*'=Match  -This is not required (No characters after matched substring)

eabcd, '*abcd*'=Match  -This is not required (No characters before matched substring)

abcd e,'*abcd*'=Match - This is required

1234 5,'*1234*=Match - This is required

1234cd,'*1234*'=Match  =This is required


What should i change in my code to get it.

6 Replies
Anil_Babu_Samineni

May be this?

LOAD * from Source Where Not WildMatch(Description,'*1234*', '*abcd*') or SubStringCount(Description, ' ');

OR

LOAD * from Source Where Not WildMatch(Description,'*1234*', '*abcd*') or Index(Description, ' ') >0;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Pulkit_Thukral
Partner - Creator II
Partner - Creator II
Author

Description may have 100 characters in it and hence space might be present somewhere else.

Can we write some code to check if character just after/before the matched string is not number, only then consider it ?

Anil_Babu_Samineni

Can you provide 20 Different values in real data. that may useful to debug where we are?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ahaahaaha
Partner - Master
Partner - Master

Hi,

Not fully understood result. The last line is required, although the result Match is the same as the first line. Are there any requirements for the presence / absence of letters / numbers in [Description] to determine attribute [Machine name]?

Regards,

Andrey

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Have a look at the attached application.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
jmvilaplanap
Specialist
Specialist

Hi

There is a function in the QVC (GitHub - RobWunderlich/Qlikview-Components: A library for common Qlikview Scripting tasks) to made applymap functions with wildcards. Is called Qvc.CreateWildMapExpression

It can be a good solution

Regards