Command Reference : String and Date Function Reference
  
 
@wnotin
Remove words from string list.
Syntax: @wnotin(str_list1, str_list2)
str_list1: string
str_list2: string
Return: string
Returns elements of str_list1 that are not in str_list2. This function is case-sensitive.
Examples
string employee1 = @wnotin("Full Name: John Smith", "Full Name:")
string employee2 = @wnotin("Full Name: Mary Jones", "Full Name:")
assigns the string “John Smith” to the string object EMPLOYEE1, and the string “Mary Jones” to the string object EMPLOYEE2.
@wnotin("John and Greg won", "and Greg")
returns the string “John won”.
If ALPHA1 is an alpha series,
alpha strnot = @wnotin(alpha1, "and or not")
returns the strings in ALPHA1 with the words “and”, “or”, and “not” removed, for each observation in the workfile sample.
If SVEC1 is an string vector,
svector strnot = @wnotin(svec1, "and or not")
returns an svector with each string element of SVEC1 after removing “and”, “or”, and “not”.
Cross-references
See also @replace, @wdrop, @wkeep, @wreplace, @wunique.