I am wondering/hoping there may be a way to use Regular
Expressions to
parse through the text of a Stored Procedure and give me
back a list of
the Table names used within the proc.
It seems that a Table name in a stored proc is typically
found after
one of five key words: FROM, UPDATE, INTO, TABLE, and JOIN
(unless I am
forgetting others). I know you can do a "FROM
(SELECT....)" so I am
thinking if the RegEx should only look for an actual word
imediately
following one of those five key words. Oh, and it just
occurred to me,
the RegEx should ignore any lines that start with
"--" and also any
lines inside a "/* */" pair. Is that/this
possible? Have a RegEx look
for a word following one of those key words and return just
those words
found?
Again I find myself reliant on you RegEx Gurus out here as I
am worse
than a novice with these things. I have looked through
http://regexlib.com/ for
anything like this an am not seeing it.
Your help is greatly appreciated!!
-- Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|