RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
# The real regex is: # (?<=\n......\s*\b)COPY\b\s*\b(\w*(-)?\w*)*\b \bCOPY\b\s*\b(\w*(-)?\w*)*\b
Description
This regex is handy for matching *uncommented* COPY statements in COBOL programs, plus the name of the copy book member to be copied. If you want to list out the COPY'ed source files contained in a COBOL program, this will do it. Consider the text: Y2K COPY CD10D-ERRORS. UARK01*COPY DPSSTATUSCOB IN DPSLIB. UARK01 COPY INFO-BUFFER . The COPY statements on the first and third line will be matched, but the second line will not match because of the COBOL comment character in column 7, which comments out the whole line, including the COPY statement, thus it is excluded from the compile.
Matches
COPY DFHAID
Non-Matches
COPEY DFHAID | COPPY 100-MAIN-RECORD.
Author Rating: Not yet rated. Jim Daniels
   Displaying page 1 of 1 pages; Items 1 to 1

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials