We have program headers in the following format:
Code: Select all
/*====================================================================
Study Number : XXXX
Program Name : xxxx
Purpose : Some comment about the program's purpose
SAS Version : SAS 9.1.3
Input Data : Some comment
Output Data : More comment
Macros Called : None
Originally Written by : Scott Bass
Date : 11MAR2010
Program Version # : 1.0
======================================================================
Modification History : Original version
====================================================================*/
1) Replace "Study Number" with some static text
2) Replace "Program Name" with the current filename. Does $FileName work in regular expression like it does with Tools configuration?
3) Replace "Originally Written by" with some static text (the current programmer, who's cloned this code from someone else)
4) Replace "Date" with the current date
I'd like to restrict the edits to text between the first /* and next */ occurring in the file, in case "Program Name" or "Date" occur later in the file.
My main question is with #2 - is the current filename available to regular expressions as replacement text?
Finally, two more questions:
1) Helios, if you're listening, I know you keep your futures development list close to your chest - that's just how you choose to do your business. However, is an update to your Textpad regular expression engine in the current pipeline?
2) Does WildEdit use the same regular expression engine as Textpad? I realize the above may be better suited for WildEdit. But, if it uses the same engine as Textpad, it's unacceptable, and I'll just have to write a Perl script to accomplish this task.
Thanks,
Scott