Macros for SAS Application Developers
https://github.com/sasjs/core
mf_wordsinstr1butnotstr2.sas File Reference

Returns words that are in string 1 but not in string 2. More...

Go to the source code of this file.

Detailed Description

Compares two space separated strings and returns the words that are in the first but not in the second.

Note - case sensitive!

Usage:

%let x= %mf_wordsInStr1ButNotStr2(
  Str1=blah sss blaaah brah bram boo
  ,Str2=   blah blaaah brah ssss
);

returns:

sss bram boo

Parameters
[in]str1=() String containing words to extract
[in]str2=() Used to compare with the extract string
Version
9.2
Author
Allan Bowe

Definition in file mf_wordsinstr1butnotstr2.sas.