Feel free to point me to the correct newsgroup if you can thik of a better one.
I would like to parse a SQL script using Regular Expressions
For example, I have this string in My SQL Script:
CREATE VIEW vw_Something AS
I would like to grab the view name and view contents.
I've come up with this Regular expression string:
This will give me the view name in the first bracketed subselect.
Getting the view contents seems to be more difficult. I want to find all the text between these patterns:
FROM: the end of the last regular expression
TO a whitespace surround 'GO' string, so something like this:
The problem I have is a I cant 'not' match an entire string.
Can anybody help? I can reexplain if required!!!