tag:blogger.com,1999:blog-7666066816041190661.post4628931149510050810..comments2024-01-09T05:29:15.338-07:00Comments on Heuristic Andrew: Gotcha with SAS, regular expressions, and end-of-line matchingAndrew Zhttp://www.blogger.com/profile/10108637160465346326noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-7666066816041190661.post-57720053363462734022017-12-04T10:01:50.222-07:002017-12-04T10:01:50.222-07:00Thank you for this post! I spent hours trying to f...Thank you for this post! I spent hours trying to figure out why SAS wouldn't match what I wanted to find. I already had applied the strip function to the sting in a previous data step but apparently that did not do the trick. It was not observable from copying the string to an editor either.비글https://www.blogger.com/profile/16149871790079165925noreply@blogger.comtag:blogger.com,1999:blog-7666066816041190661.post-42972723795972144942017-07-24T16:42:13.355-06:002017-07-24T16:42:13.355-06:00Thanks a lot Andrew. I thought that I will have to...Thanks a lot Andrew. I thought that I will have to rewrite my test cases if I would not have found your article. I was surprised to see this behaviour in sas and couldn't find a way out.This is the beauty of sharing, you took the trouble of writing this article that saved me huge trouble of searching an alternative to regex for writing test casesAnonymoushttps://www.blogger.com/profile/14280261684360771549noreply@blogger.comtag:blogger.com,1999:blog-7666066816041190661.post-8184590168017478102015-10-07T17:42:13.025-06:002015-10-07T17:42:13.025-06:00Thanks Andrew... I expected the opposite to be tru...Thanks Andrew... I expected the opposite to be true. Knowing SAS doesn't care about trailing spaces, I figured that surely $ would match the end of text in a line, rather than the absolute end of the length of the variable (which is kind of useless). The workaround of adding trim() to the input variable within the prxmatch function got it to work the way I'd expect.chrishttps://www.blogger.com/profile/02381495796162469450noreply@blogger.com