tphyahoo wrote:
There are various haskell regex libraries out there,

Jules Bean wrote:
But that's such a perler attitude. When all you have is a regex,
everything looks like a s///!

Not always, sometimes it is right to use regexes in Haskell
also.

If there are more than a few patterns to match in the same
string, or if the patterns are more than a few characters long,
then the simple approach will start becoming expensive.

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.

Regards,
Yitz
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to