CALL "P$SETBOXSHADE" USING "Black", 10 CALL "P$DRAWBOX" USING 2.5, 3.0, "Absolute", "Inches", .25, .25, "Inches", "No". CALL "P$SETBOXSHADE" USING "Red", 20 CALL "P$DRAWBOX" USING 3.5, 3.0, "Absolute", "Inches", .25, .25, "Inches", "Yes". |
... 77 ret-regexp pic s99. 77 w-string pic x(50). 77 reg-expr pic x(50). 77 h-regexp handle. 77 h-result handle. ... CALL "C$REGEXP" USING CREGEXP-GET-LEVEL GIVING ret-regexp move "This is a big house with garden" to w-string string "(big)\s+(house)" x"00" delimited by size into reg-expr CALL "C$REGEXP" USING CREGEXP-COMPILE, reg-expr GIVING h-regexp if h-regexp not = null move 0 to w-length, match-start, match-end CALL "C$REGEXP" USING CREGEXP-MATCH, h-regexp, w-string, w-length, match-start, match-end GIVING h-result if h-result = 0 CALL "C$REGEXP" USING CREGEXP-LAST-ERROR GIVING ret-regexp else compute w-bytes = match-end - match-start display "found:" w-string(match-start:w-bytes) end-if CALL "C$REGEXP" USING CREGEXP-NUMGROUPS h-result GIVING ret-regexp move ret-regexp to num-groups perform varying w-group from 1 by 1 until w-group > num-groups CALL "C$REGEXP" USING CREGEXP-GETMATCH, h-result, w-group, idx-start, idx-end GIVING ret-regexp ... end-perform end-if CALL "C$REGEXP" USING CREGEXP-RELEASE-MATCH h-result CALL "C$REGEXP" USING CREGEXP-RELEASE h-regexp ... |