Hi Everyone, I have a business problem where I wanted to perform patter check on the column. I wanted to check if the values are in a particular format like decimal20.5. It should fail if the format is different from it. data have; input col1; datalines; 0.01238788 61.15612 123.12 12.1244 12345.125665 ; run; - > using below solution: %let pattern=^[0-9]\d{1,20}(\.\d{1,10})?%?$; data want; set have; pattern_val=pxparse("/&pattern./"); v1=prxmatch(%nrbquote(pattern_val),col1); if prxmatch(%nrbquote(pattern),col1) gt 0 then pass=0; else pass=1; run; 0- means the value is in decimal 20.5 format 1- other than that Note: I am not much familiar with regex and took the expression from internet. I have to use the snippet in my other macro codes so need to make it dynamic with pattern code. Any help is very much appreciated. Thanks,
... View more