>I do not think using regular expressions here will give Mike what he is looking for.
>
>Regular Expressions in Code References search on each line independently, not the entire method/program all at once.
>
>The expression
\bdelete\b.+\bsam\b will only find lines that have
delete followed by
sam on the same line,
>
>I, too, have wanted to be able to looked for modules, rather than lines of code, such as have been requested here, but have never seen anything that would do so.
>
>Regular Expressions in Code References search on each line independently,
Did not know that. But in any case, regex can match across line boundaries. But you have to add the newline chars to the pattern since the dot does not match a newline
local obj
local s
text to s noshow
delete
c
xds
well same as well
endtext
obj = createobject('VBScript.RegExp')
obj.multiline = false
obj.global = true
obj.IgnoreCase = true
obj.Pattern = '\bdelete\b(.*[\n].*)*\bsame\b'
matches = m.obj.Execute(m.s)
?matches.count
for each match in m.matches
?' .'
?'<' + match.Value +'>', match.length
endfor
Gregory