SAS CHARACTER FUNCTIONS - 7|PERL REGULAR EXPRESSION in SAS|SEARCH FOR A VALUE PATTERN IN A VARIABLE
Вставка
- Опубліковано 18 вер 2024
- This video explains how you can use the PRXMATCH significantly to look for a PATTARN in a particular string/character variable.
This shows you an interesting example to extract a pattern digits for a mobile number.
If you want learn:
► HOW TO USE PRXMATCH IN SAS
► What is PERL EXPRESSION or PERL REGULAR EXPRESSION and how to use this
► HOW TO FIND THE OBSERVATIONS WHICH STARTS WITH, CONTAINS OR ENDS WITH SOMETHING
► HOW TO FIND A PATTERN OF VALUES IN A CHARACTER VARIABLE
#Learnerea
#SASTraining #SASTutorial #SASCourse #SASTutorialForBeginners #SAS #SASforBeginners
#SASProgramming #SASTProgrammingForBeginners #SASProgrammingTutorial
Contacts:
Facebook ► / learnerea
Download the excel files for data to practice:
GitHub ► github.com/LEA...
Bravo, thanks man.
Awesome video bro. You nailed it.
Glad you liked it
wonderfull presentation and example.
Glad it was helpful
Thanks sir
Hey this helped me a lot! Very clearly explained thanks a lot!
Glad you liked it
Keep upload more videos sir thank you
Keep watching
if we have any special characters like , @ ! then which expression should we use.
It depends what exactly you want, for example if you just want to look for strings which contains any of these characters you can simply put these characters between "/ /" as explained in the video e.g.
prxmatch("/@/",text);
it will be great if you can be more specific and provide an example along with problem statement
Thank you for the lecture, very well explained. I have two questions on this subject and looking for an answer, could you please help? Thanks! really appreciated.
1) Which perl regular expression can represent 5MQ, 5:MQ, 8MQ, or 8:MQ
prxmatch('', x)
2)Which perl regular expression can replace MOUSE with RAT in prxmatch?
the choice are '\s\MOUSE\RAT', '\s\RAT\MOUSE', '
\MOUSE\RAT', '
\RAT\MOUSE'
Is there any other function similar to prxmatch.
I have a condition like want extract dates present in the variable label
Yes that can be solved. Can you elaborate your problem statement a bit more.. i.e. how does your input look like and what kind of output you are expecting.. and in what conext you are using this..
it will help us give you a more specific solution
How do I retrieve a substrings from a string using delimiters .
Example : memoline cust 266 / 0,
memoline cust 266 / 123 ,
memoline cust266 / 0.00 and I wanna filter out all data with 0 or 0.00 after / .. stuck help pls
Please find below:
data testing;
input variables $25.;
datalines;
memoline cust 266 / 0
memoline cust 266 / 123
memoline cust266 / 0.00
;
run;
data test;
set testing;
where compress(variables) like '%/0%';
run;
@@learnerea thankyou will try that
@@learnerea thanks sir
Hi could you please show how to convert from one delimeter to another
Hi Laicy,
To make it more clear, could you pleas put an example of your problem statement here, like what you have and how you want that to be converted
@@learnerea For example I have one basic dataset, in that default delimeter will be comma, how do I convert that to star? Is there any direct method?
@@laicythomas7380 Yes, I assume that the value is not some currency value which are separated by commas and it's character value then you can use TRANWRD function to directly replace whatever you want, for example, Try to use the below:
name = tranwrd('Laicy, Thomas', ',' ,'*')
for more clarity I recommend you to check out the video:
ua-cam.com/video/xoJmyD2oBLg/v-deo.html
let me know if this answers you question or not
@@learnerea Okay, Thank you so much. I got it now.
@@laicythomas7380 Happy to help ☺
transaction data missing from your site
my sincere apologies for that... however, you can try this technique on any sort of data... and it's more beneficial if you try to perform the taught technique on your choice of data and see if that works as expected or not..
you can download any other excel file from the given link and can try..
happy to help any further