Hi,
I am a beginner in Regex and it's very difficult to understand some errors. I want to find 30 kms or 30 km, or 30 kilometers
Can you provide more details of what you have tried?
Are you trying to write CODE? If so show the code. Provide some example input data and the expected result.
Are you trying to use REGEX is some other place? Explain where.
Be specific about the environment you are using and the version of SAS you are using and version of any front end tools like Enterprise Guide or SAS/Studio.
Add some sample data would be very helpful to understand your question.
Here you go.
data x;
input x $80.;
if prxmatch('/\d+\s*(km|kms|kilometers)/i',x) then match=1;
else match=0;
cards;
I want to find 30 kms
I want to find 30 km,
I want to find 30 kilometers
I want to find kilometers
;
Ksharp_0-1768271850308.png
CFC_SAS_Communities_400x225.jpg
It's your turn to help shape SAS Innovate 2027. Share your expertise and inspire the SAS community.
Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.
Find more tutorials on the SAS Users YouTube channel.