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.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: 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.

BASUG is hosting free webinars Next up: Don Henderson presenting on using hash functions (not hash tables!) to segment data on June 12. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 283 views
  • 0 likes
  • 2 in conversation