Hi all.
I would like to ask you about search patterns in text ?
how to search for a particular keyword : left private home or left side private home
1) between keyword1 'title:' X and keyword2 'builder :'
1A) if found , assign a value home=left private
2) skip text in middle and search after the keyword more information:
for left floor1 or left 1floor ( sometimes written 1floor or floor1)
2A) if found , assign to the variable: SIDE the value left ( or right) and the value 1floor to the variable floor ( the number of flours could vary from 0 to 10)
here is the text for example:
and ( if possible)..
3) if in the first task home=left private and SIDE = right (missmatch of sides ..) add a mention to the variable missmatch=problem
Hello this is some text title : great news here <-- first part of the exercise new beautiful left private home <-- this is the scope to start with builder: a new company constructed the home blablbablablbablablbablablbablablba some text ..... for more information: you can contact to acquire left floor1 Mr. smith, or Mr John
I'm trying to figure out how to use RE and internal SAS F to search for text...that is in variables, I'll have to put all in a loop afterwards..
Thank your response
Please clearly indicate which are key words. I am not sure if the word is a single word and what it may be or you want to use a phrase
Your subject says "search for a word between two words" , so which are the exact two words searched between???
Example:
how to search for a particular keyword : left private home or left side private home
Is "left private home" a key phrase searching for? or is the OR what you are searching for?
And providing examples of the text to search in and showing what the actual results look like.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.