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?
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: