Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Wildcard Function for finding word with similiar patterns

Is there a some kind of function that will match these similar (but not exact) patterns. Some kind of function to capture this pattern in an if statement?:

NE Region

N.E. Region

NERegion

Steve

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

No simple function, but if you "normalize" the strings like this to compare:

     KeepChar(Lower(Field), 'abcdefghijklmnopqrstuvwxyz')

This will discard all non-alpha characters and set all to the same case. Add language special characters to the KeepChar() list to meet your needs.

If that is insufficient, you can use a VB script (or JS) function to calculate the Levenshtien distance between the two strings to compare. I no longer have the code for this, but details and pseudocode here should make it straightforward:

Levenshtein distance - Wikipedia

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

No simple function, but if you "normalize" the strings like this to compare:

     KeepChar(Lower(Field), 'abcdefghijklmnopqrstuvwxyz')

This will discard all non-alpha characters and set all to the same case. Add language special characters to the KeepChar() list to meet your needs.

If that is insufficient, you can use a VB script (or JS) function to calculate the Levenshtien distance between the two strings to compare. I no longer have the code for this, but details and pseudocode here should make it straightforward:

Levenshtein distance - Wikipedia

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
zagzebski
Creator
Creator
Author

Thanks much Jonathan!