where prxmatch('/^3[47][1236789].*/',put(cm13,13.))
What does the above prxmatch do?
Try strip(put(... adjusting parantheses to match
The format is putting out a string of 13 characters but the leading characters are blanks. So the substr is returning ' '
It means the first digit(at the beginning of the string) should be 3 ,the second digit shoud be 4 or 7 . the third digit should be 1 or 2 ...........
The hat(^) means not to include right?
I am afraid not. ^ here is to match beginning of line; [^abc] is to match a character not in the brackets.
Haikuo
When I use prx match and substr I'm getting different results.
If I substituted with substr function where substr(put(cm13,13.),1,3)='347'; I'm getting zero records.
Where as with PRX I'm getting some records.
Try strip(put(... adjusting parantheses to match
The format is putting out a string of 13 characters but the leading characters are blanks. So the substr is returning ' '
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.