BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
raja777pharma
Fluorite | Level 6

Hi,

 

I am trying to find the float numeric values with prxmatch but I am getting errors as below.

 

raja777pharma_0-1657111549536.png

 

My code is to match the below values is = prxmatch("/^[<>-+]?\d*\.\d+$")

 

Values to match like = 123 , +23 , 34.56, -234.5, >93, <87, <67.87.

 

Plase help me to mathc the above values with prxmatch.

Thank you,

Rajasekhar.

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @raja777pharma,

 

To prevent ">-+" from being misinterpreted as a range you can escape the minus sign with a backslash:

/^[<>\-+]?\d*\.?\d+$/

Or simply avoid putting it between two characters:

/^[<>+-]?\d*\.?\d+$/

 

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

Please show us the entire log for this DATA step. Copy the log as text, paste it into the window that appears when you click on the </> icon.

 

Insert Log Icon in SAS Communities.png

--
Paige Miller
raja777pharma
Fluorite | Level 6

Hi,

 

Below is log screen shot with proc sql step.

I can't copy the log as the copy is not working from my SAS EG

raja777pharma_0-1657114824011.png

 

Thank you,

Rajasekhar.

FreelanceReinh
Jade | Level 19

Hi @raja777pharma,

 

To prevent ">-+" from being misinterpreted as a range you can escape the minus sign with a backslash:

/^[<>\-+]?\d*\.?\d+$/

Or simply avoid putting it between two characters:

/^[<>+-]?\d*\.?\d+$/

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 353 views
  • 2 likes
  • 3 in conversation