I created the following RegEx to detect a procedure in a code (the arguments part was deliberately omitted):
Code: Select all
RegEx.s="(?i)^(\s*;*)procedure(dll|cdll|c)? *(\.(a|b|c|d|f|i|l|q|s|u|w))? *_*[a-z]{1}(\w)*\({1}.*\){1}"
Code: Select all
Procedure Name() => Accepted
Procedure Name() => Accepted
; Procedure Name() => Comment => Rejected
Code: Select all
Debug “;” : Procedure Name()
[EDITS] : Question not solved but below RegEx updated to authorize spaces in certain locations and prohibit ProcedureReturn :
Code: Select all
(?i)procedure(?!return)(dll|cdll|c)? *( *\. *(a|b|c|d|f|i|l|q|s|u|w))? *_*[a-z]{1}(\w)* *\({1}.*\){1}"