Group intersection relevance

(imported topic written by Ekkopto91)

consider the following:

q: (substrings (substrings separated by “|” of “cat|fish”) of “catfish”)

A: cat

A: fish

q: (substrings (substrings separated by “|” of “catfish|dog|bird|cat|fish”) of “catfish”)

A: catfish

A: cat

A: fish

q: (it whose (it equals “cat”) of (substrings (substrings separated by “|” of “catfish|dog|bird|cat|fish”) of “catfish”))

A: cat

q: (it whose (it equals (substrings (substrings separated by “|” of “cat|fish”) of “catfish”)) of (substrings (substrings separated by “|” of “catfish|dog|bird|cat|fish”) of “catfish”))

E: A singular expression is required.

Is there a way to effectively come up with the intersection of two groups?

(imported comment written by jeremylam)

There is a “string set” type that has the intersection operator:

q: elements of intersection of (set of (“a”;“b”;“c”); set of (“b”;“c”;“d”))

A: b

A: c

q: elements of intersection of (set of ((substrings separated by “|” of “catfish|dog|bird|cat|fish”) of “catfish”); set of ((substrings separated by “|” of “cat|fish”) of “catfish”))

A: cat

A: fish

For other inspectors on the string set type, please see the inspector help page:

http://support.bigfix.com/cgi-bin/inspectorsearch/inspector_search.cgi?win=&lin=&hpux=&mac=&aix=&sol=&wm=&ubu=&client=on&core=on&session=on&regex=on&cpx=&keyphrase=&type=string+set&return=&win=&lin=&hpux=&mac=&aix=&sol=&wm=&ubu=&sort_key=cpx

(imported comment written by Ekkopto91)

Thanks - that will work great.