G
Guest
Hi,
I am using a regular expression to read records from a text file. But when
reading files with invalid formats it takes ages before the program rjects
the file. So I want to optimise the expression to reject invalid files
faster.
The valid files are wellformed and looks something like this:
Once upon a time
CODE NUMBER:123
There was a little lamb
CODE NUMBER:2134
Each record is terminated by a form feed and the reg-expression is something
like this:
..Pattern = "(.*)\r\nCODE NUMBER
\d+)\r\n\f"
Any ideas on how to speed up file rejection?
Regards
Bertrand
I am using a regular expression to read records from a text file. But when
reading files with invalid formats it takes ages before the program rjects
the file. So I want to optimise the expression to reject invalid files
faster.
The valid files are wellformed and looks something like this:
Once upon a time
CODE NUMBER:123
There was a little lamb
CODE NUMBER:2134
Each record is terminated by a form feed and the reg-expression is something
like this:
..Pattern = "(.*)\r\nCODE NUMBER

Any ideas on how to speed up file rejection?
Regards
Bertrand