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

Hello,

 

I am using a macro to compare two versions of an rtf output for differences. My question is there a way to compress/remove control words such as /trowd or /setd using regular expressions so that when using proc compare to detect differences they will match up better. For example.

 

\trowd\trkeep\...etc..\cf1{Alfreq\cell}\pard\...cf1{1.6\cell}\pard…..\cf1{60\cell}{\row}
\trowd\trkeep\...etc..\cf1{Alice\cell}\pard\...cf1{1.5\cell}\pard…..\cf1{50\cell}{\row}

 

being turned into this

Alfreq ^^^ 1.6 ^^^ 60 ^^^
Alice ^^^ 1.5 ^^^ 50 ^^^

 

1 ACCEPTED SOLUTION

Accepted Solutions
Quentin
Super User

If you search lexjansen.com you'll find papers on this, e.g. 

 

https://www.lexjansen.com/pharmasug-cn/2017/CC/PharmaSUG-China-2017-CC07.pdf

https://www.pharmasug.org/cd/papers/TT/TT13.pdf

 

But after skimming, I don't think I would do this in SAS.  I'd be more likely to read the RTF's into MS Word, and use Word's compare feature.  Which could probably be automated with VBA or whatever if needed.

View solution in original post

1 REPLY 1
Quentin
Super User

If you search lexjansen.com you'll find papers on this, e.g. 

 

https://www.lexjansen.com/pharmasug-cn/2017/CC/PharmaSUG-China-2017-CC07.pdf

https://www.pharmasug.org/cd/papers/TT/TT13.pdf

 

But after skimming, I don't think I would do this in SAS.  I'd be more likely to read the RTF's into MS Word, and use Word's compare feature.  Which could probably be automated with VBA or whatever if needed.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 893 views
  • 0 likes
  • 2 in conversation