@SASKiwi wrote:
@mkeintz - Nice correction, but then I realised my attempt doesn't doesn't cater for multiple sets of parenthises so I think that a DO UNTIL (or WHILE) loop is still needed for that case.
@SASKiwi I don't think a DO loop is required. My understanding is that all text from the left outer paren through the right outer paren is to be eliminated, leaving the leftmost "word" preceding the first "(" and the rightmost word following the last ")". No need to account for interior parens.
@mkeintz - This is the case I looked at
Have:
AAT(BB)ADAA(CCDC)AXC
Want:
AATADAAAXC
Your solution gives: AATAXC
@SASKiwi wrote:
@mkeintz - This is the case I looked at
Have:
AAT(BB)ADAA(CCDC)AXC
Want:
AATADAAAXC
Your solution gives: AATAXC
Ah. Right you are.
@mkeintz - I thought about it long and hard and realised that any non-PRX solution is likely to be no better than the PRX one 🙂
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.