in reply to Re^2: Suggestion for regular expression speed improvement.
in thread Suggestion for regular expression speed improvement.
Going beyond split to a proper CSV-handling module, you will be able to not only read arbitrary numbers of tab-separated columns, but it will also give you the ability to recognize quoting of the fields, so that they can contain embedded tabs without causing false field separations. Accomplishing this with regexes is messy, at best.
1 ...unless you switch from (.+) to ([^\t]+), in which case it will only match lines containing exactly 25 fields.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Suggestion for regular expression speed improvement.
by Anonymous Monk on Jun 15, 2009 at 17:15 UTC | |
|
Re^4: Suggestion for regular expression speed improvement.
by bala.linux (Novice) on Jun 15, 2009 at 17:20 UTC |