Hi, I would just like to ask if there's a function in SAS that can look for 10 consecutive numeric characters in a string?
I have a table with 2 columns..Column A contains the following data:
I wanted to populate Column B with a value that depends on whether there are 10 consecutive numeric characters in a string in Column A. I'm looking for a SAS function that may be able to help me with this (something like findc), as im avoiding using arrays or checking each character as it might be process intensive specially when alot of observations are already involved.
Thanks in advance.
Edit: I'm using SAS 9.1 and looking to do this in a data step if possible.
Message was edited by: jpmoreno
ah that one ....the use of IF _N_ = 1 then do; or W/O it doesn't makes any difference( thank god i remember this ) coz for constant regular expression the compilation happens only once and the value to the left side variable would be same for next successive observations as was for 1st observation. So successive calls to PRXPARSE will not cause a recompile, but will return the same value to the left side variable for the regular expression that was already compiled.
Again, as you said - "many ways to skin a cat" ..w/ or w/o doesn't makes any difference in case of constant regular expression like the one above.