Start with fixing the syntax. You didn't close the parenthesis.
In regular expressions, always put substrings alternatives after the full string "m/brakepads|brake pads|pads|brake/io", that way you will match the full expression before any of its components.
@Gil_ wrote:
Im needing help to find 3 words in a text
Here is what i have
Data test;
Set test;
If prxmatch('m/brake|brakepads| pads /oi',textbox,>0;
Run;
When i run it the data gets removed
What is it you want to do when you found those words in the string?
Since you are using an IF conditions only the records that contains those words are returned. SAS won't do anything that you haven't told to do so.
Start with fixing the syntax. You didn't close the parenthesis.
In regular expressions, always put substrings alternatives after the full string "m/brakepads|brake pads|pads|brake/io", that way you will match the full expression before any of its components.
@Gil_ wrote:
Im needing help to find 3 words in a text
Here is what i have
Data test;
Set test;
If prxmatch('m/brake|brakepads| pads /oi',textbox,>0;
Run;
When i run it the data gets removed
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.