I have thousands of COBOL Copybooks where I need to make modifications to various number of PICS. I am looking for a regular expression that will replace the following '9' to an 'X'
where the '~' is a VARIABLE number of spaces, and where 'N' is a VARIABLE number of digits. The period '.' at the end of the line is required on the line. The parentheses '( )' are also required as part of the PIC line.
Finally, I do not want to modify any PIC 9's that are COMP or COMP3. For instance, the following is not a candidate for modification:
I am new to regular expressions, and do not know how to handle the parentheses and periods, inasmuch as they are actually part of the expression. The type of regular expression can be Perl or Unix.
Thanks in advance.