DEFINE CLASS test PROCEDURE init IF ATC("DEFINE CLASS",x)>0 * ENDIF IF ATC("PROCEDURE",x)>0 * ENDIF ENDPROC PROCEDURE destroy ENDPROC ENDDEFINEIf I am look for the "DEFINE CLASS" (ignoring the case), I would like for it to find only the "DEFINE CLASS test". Also, If I am looking for "PROCEDURE", I want it to find only the "PROCEDURE init" and "PROCEDURE destory", not the one in the ATC().
RegExp = NEWOBJECT( "_RegExp", "RegExp.vcx" ) ctext=FILETOSTR("tt.prg") ? RegExp.execute( ctext, [(\bdefine class\b)], .F., .T.) ? RegExp.execute( ctext, [(\bprocedure\b)], .F., .T.)I realize I need to be including the '^' (start of line), possibly '\s*' for the white spaces. but when I do include them the query fails to find anything. I only want it to find matches that are at the beginning of the lines.