Command Reference : String and Date Function Reference
  
 
@wkeep
Syntax: @wkeep(str_list, pattern_list)
Argument 1: string list, str_list
Argument 2: string pattern list, pattern_list
Return: string list
Returns the list of elements in str_list that match the string pattern pattern_list. The pattern_list is space delimited and may be made up of any number of “?” (indicates any single character) or “*” (indicates any number of characters). The pattern is case-sensitive and must exactly match the str_list characters to be kept.
Example:
@wkeep("D D A B C", "B D C")
returns all matching elements in pattern_list that are found in str_list: “D D B C”.
@wkeep("ABC DEF GHI JKL", "?B? D?? *I")
keeps the first three elements of the string list, returning the string “ABC DEF GHI”. The string pattern “?B?” keeps “ABC”, the pattern “D??” keeps “DEF”, and the pattern “*I” keeps “GHI”.
See also @wdrop and @wreplace.