I am currently taking advanced programming course in SAS. When I did the demo problem(course 3, demo-p302d04), I am confused about the comprehension about the PRXMATCH function. I know the prxmatch is to search the first position of the character. But I cannot make sense the output table responding to the code created. Can you please help me to learn how to comprehend the result following? Thanks so much!
Loc=prxmatch('/([2-9]\d\d)-([2-9]\d\d)-(\d{4})/',Phone);
PRXMATCH returns the beginning position of a substring that matches your regular expression. [2-9] for example matches any digit between 2 and 9, \d matches any digit, a dash matches a dash. Parentheses are used to delimit sub matches that can be extracted with the function PRXPOSN, once a match is found with PRXMATCH.
Search the web - there are plenty of tutorials about regular expressions and their use.
PRXMATCH returns the beginning position of a substring that matches your regular expression. [2-9] for example matches any digit between 2 and 9, \d matches any digit, a dash matches a dash. Parentheses are used to delimit sub matches that can be extracted with the function PRXPOSN, once a match is found with PRXMATCH.
Search the web - there are plenty of tutorials about regular expressions and their use.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: