I have a number of lines of text in the following pattern:
"Create View [MyView] As [Some SQL]"
And these are interspersed with other lines of text. I want to identify all the 'Create View' lines, then use a regular expression that isolates the [MyView] and the [Some SQL] portions of the line as distinct variables.
I'm sure this is quite simple but I'm only vaguely familiar with regular expressions and am not having any luck. I'm reading in the text-file line by line, and I have created the RegExp object in the script and can ID & replace parts of the string but that's it.
Thanks.
"Create View [MyView] As [Some SQL]"
And these are interspersed with other lines of text. I want to identify all the 'Create View' lines, then use a regular expression that isolates the [MyView] and the [Some SQL] portions of the line as distinct variables.
I'm sure this is quite simple but I'm only vaguely familiar with regular expressions and am not having any luck. I'm reading in the text-file line by line, and I have created the RegExp object in the script and can ID & replace parts of the string but that's it.
Thanks.