Ad
  • Custom User Avatar

    Regex is overkill for anything.

    If it's a very simple parse, like this, you'll get better performance and code that's easier to read by just writing it out imperatively. If it's a complicated parse, you'll be less likely to run into bugs, and have code that's easier to read, by using a proper parser DSL such as ANTLR. Regex isn't particularly good at either case, and its complexlity is extremely high. The "now you have two problems" joke exists for a reason.

  • Default User Avatar

    Is regex an overkill for this one? Just asking because I'm not really familiar with regex.