
5 Jan
2007
5 Jan
'07
9:38 a.m.
Yitzchak Gale wrote:
You need to use a more sophisticated algorithm - building up trees of potential matches, backtracking in some cases, etc. Why re-invent the wheel? Just use the regex library, where that is already done.
It's merely a question of selecting the right wheel. Some problems are so simple that regexes are overkill. Some problems are so complex that regexes are insufficient. Some problems generate extraordinarily ugly regexes, which are then hard-to-debug. Some problems are perfectly suited to regexes. Jules