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: 
johnca
Specialist
Specialist

Select Specific Strings & String Format

I need to select lines where there are specific strings contained somewhere in the field. The format of the string desired is 'nnnn-nnnnn' where n = a number 0-9 (no vowels or special characters), so they would look like this; 2015-70707. My problem is there are examples where the string I want is there but does not follow the format exactly. Sometimes there may be a space on one side of the hyphen or not, or more than one example in each line. The result desired would be the string 'nnnn-nnnnn'. Here are examples of what I need to include and not include in my query;

Any ideas on how to maximize my selections? 

ValueIncludeResult
6.23.2015-429226no<not included>
521 / 2015-88584yes2015-88584
2015- 80808yes2015-80808
2015-60776yes2015-60776
2015-66208yes2015-66208
2015-71757 & 2015-71726both2015-71757
2015-71757 & 2015-71726both2015-71726
2015-72052 PO BL060315yes2015-72052
711717 - PROJ040805no<not included>
711733 2015-74104yes2015-74104
BL5928 2015-78037yes2015-78037
cG75382-WP / 2015-72069yes2015-72069
GRS515 / 2015-88522 / 2015-87229both2015-87229
INC13778737 / 2015-89742yes2015-89742
LOST UNIT REPLACEMENT- 109325no<not included>
LOST UNIT REPLACEMENT-100016no<not included>
Quote 2015-66816yes2015-66816
1 Solution

Accepted Solutions
cwolf
Creator III
Creator III

Hi John,

I hope that help.

Regards

Christian

View solution in original post

2 Replies
cwolf
Creator III
Creator III

Hi John,

I hope that help.

Regards

Christian

johnca
Specialist
Specialist
Author

Hi Christian, considering that I am going to be using this in a subsequent "Where Exists" clause it works perfectly for my needs. Thank you very much!

(This was inadvertenly addressed to Joe. My apologies to Christian)