- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.