DATA Step, Macro, Functions and more

PRX

Accepted Solution Solved
Reply
Super Contributor
Posts: 647
Accepted Solution

PRX

where prxmatch('/^3[47][1236789].*/',put(cm13,13.))

What does the above prxmatch do?


Accepted Solutions
Solution
‎12-21-2012 05:41 PM
Super User
Posts: 10,483

Re: PRX

Try strip(put(...  adjusting parantheses to match

The format is putting out a string of 13 characters but the leading characters are blanks. So the substr is returning '   '

View solution in original post


All Replies
Super User
Posts: 9,671

Re: PRX

It means the first digit(at the beginning of the string) should be 3 ,the second digit shoud be 4 or 7 . the third digit should be 1 or 2 ...........

Super Contributor
Posts: 647

Re: PRX

The hat(^) means not to include right?

Respected Advisor
Posts: 3,124

Re: PRX

I am afraid not. ^ here is to match beginning of line; [^abc] is to match a character not in the brackets.

Haikuo

Super Contributor
Posts: 647

Re: PRX

When I use prx match and substr I'm getting different results.

If I substituted with substr function where substr(put(cm13,13.),1,3)='347'; I'm getting zero records.

Where as with PRX I'm getting some records.

Solution
‎12-21-2012 05:41 PM
Super User
Posts: 10,483

Re: PRX

Try strip(put(...  adjusting parantheses to match

The format is putting out a string of 13 characters but the leading characters are blanks. So the substr is returning '   '

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 235 views
  • 6 likes
  • 4 in conversation