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.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

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.

The Boston Area SAS Users Group (BASUG) is hosting our in person SAS Blowout on Oct 18!
This full-day event in Cambridge, Mass features four presenters from SAS, presenting on a range of SAS 9 programming topics. Pre-registration by Oct 15 is required.
Full details and registration info at https://www.basug.org/events.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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