2

I have a line of text that needs to be updated each time a compare is run.

Original COMP Update 2005-08-27 (Date will vary)

Replaced with COMP Update 2015-08-07

Is there a way to use the replacement script to have the program update this automatically?

1 Answers1

1

The Replacement feature won't work for this because it requires fixed text for the second side, but v4 supports marking arbitrary text as unimportant separate from the file format. Use the Importance tab instead of the Replacements one.

1) Click the + button below "Unimportant text"

2) Set Text to Find to

  COMP Update \d{4}-\d{2}-\d{2}

3) Check the Regular expression checkbox

4) If you want it to affect all future comparisons, change the Use for this view only combobox at the bottom of the Session Settings dialog to Also Update Session Defaults

If you want it to only affect one specific file type, and it's not embedded in another grammar item (e.g., within a string), you can alternatively use the steps in this answer.

Community
  • 1
  • 1
Zoë Peterson
  • 13,094
  • 2
  • 44
  • 64