Yes, I have already asked this question, but the problem is much more specific. Last time I wanted to ignore the first 2 and the last line of the file. But it struck me that anyone could put as many lines as they wanted before and after the stuff I want to read in, and in that case, the code I've implemented goes to pot.
example file
USE [Shelley's Other Database] CREATE TABLE db.exmpcustomers( fname varchar(100) NULL, lname varchar(100) NULL, dateofbirth date NULL, housenumber int NULL, streetname varchar(100) NULL ) ON [PRIMARY]
What I need to do is work out where my data starts (being fname - but remember it could be called anything, so I can't use a regex looking for 'f'), where it ends (the last NULL), then read in that. Or, you know, read in the file and select that data; whatever.
I thought about using regex looking for the brackets, but wouldn't it pick up the brackets in my datatypes as well?
Any ideas? Anything will help, I'm totally stuck.
EDIT
Oh, and, the original file actually has spaces/tabs before the data (indentation), but I'm not sure if that changes anything.