Coffeehouse Post

Single Post Permalink

View Thread: Why I love .NET
  • User profile image

    Ion Todirel said:
    joechung said:
    do you have anything against regular expressions!? common where's the love Big Smile When the task involves more than 4 Substring and IndexOf calls (and other complicated logic of course), Regex all the way down Tongue Out

    I have two problems with regular expressions:  (1) they're easy to get wrong and (2) any non-trivial regular expression is write-once, read-never-again. The problem typically compounds:  either you make a simple regular expression that fails on edge cases or you get a complex regular expression that's impossible to decipher.  Or maybe you get the worst of both worlds, a seemingly simple regular expression that's actually impossible to decipher correctly.

    Also, the implementation of regular expressions commonly used these days -- I blame Perl (pcre) -- isn't regular and is horribly slow compared to a proper implementation of regular expressions.