m.RegEx.Pattern = "^\s*(((hidd(e(n)?)?)|(prot(e(c(t(e(d)?)?)?)?)?))\s+)?(proc(e(d(u(r(e)?)?)?)?)?)\s">Hi Greg,
>LParameters tcStr, tlCaseMatters > >Local loRegEx, loMatch, loMatches, i > >loRegEx = CreateObject("VBScript.RegExp") >loRegEx.pattern = this.pattern >loRegEx.ignoreCase = !tlCaseMatters >loRegEx.global = .T. > >loMatches = loRegEx.execute(tcStr) >Dimension this.matches[Max(loMatches.count,1),2] >taMatchInfo = .F. > >i = 1 >For Each loMatch In loMatches > this.matches[i, 1] = loMatch.firstIndex + 1 && fox strings are not zero-based > this.matches[i, 2] = loMatch.value > i = i + 1 >EndFor > >loMatches = .F. >loRegEx = .F. > >Return i -1 >>
>loRegEx = CreateObject("VBScript.RegExp") >loRegEx.pattern = this.pattern >loRegEx.ignoreCase = !tlCaseMatters >loRegEx.global = .T. >loRegEx.multiline = .T. >>
>(^[ \t]*(?=[_\u0041-\u005A\u005F\u0061-\u007A\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF\u0152-\u0153\u0160-\u0161\u0178\u0192#@&=\?\.\\](?!&))(?:(?:HIDD(?:E|EN)?|PROT(?:E|EC|ECT|ECTE|ECTED)?)(?:[ \t]+|(?:[ \t]*;\s*?(?=&&|$).*?$\s+)))*(?:FUNC(?:T|TI|TIO|TION)?|PROC(?:E|ED|EDU|EDUR|EDURE)?) >>
>>DEFINE CLASS test >> PROCEDURE init >> IF ATC("DEFINE CLASS",x)>0 >> * >> ENDIF >> IF ATC("PROCEDURE",x)>0 >> * >> ENDIF >> ENDPROC >> PROCEDURE destroy >> ENDPROC >>ENDDEFINE >>>>
>>RegExp = NEWOBJECT( "_RegExp", "RegExp.vcx" ) >>ctext=FILETOSTR("tt.prg") >>? RegExp.execute( ctext, [(\bdefine class\b)], .F., .T.) >>? RegExp.execute( ctext, [(\bprocedure\b)], .F., .T.) >>>>