I have a situation where I need to search a character column for a specific pattern. The pattern is based on type. I need to search within a string for a number then a capital "V" then another number right next to it.
For example within this list below I want all the rows returned except the last one.
You may have to be more specific regarding what you are looking for. The following will find a pattern of a number, followed by the letter V, followed by a number, anywhere in a string:
informat string $20.;
input string &;
if _n_ = 1 THEN pattern_loc = PRXPARSE("/\d\V\d/");
*Exact match for number, followed by the letter V, followed by
a number anywhere in the string;
Of course, if what you really want deviates from that, in any way, a different prxparse call would have to be written. You can find a nice introductory article on pattern matching at: http://www.nesug.org/proceedings/nesug03/bt/bt002.pdf