11

Unpopular opinion: Regular expressions are easy

Comments
  • 1
    Heresy. They are the hardest thing for me.
  • 11
    Very easy to write... And then 6 months happens :D
  • 8
    I just wish the syntax was consistent everywhere. Otherwise I agree.
  • 5
    Depends on what you're doing. Also, they're somewhat easy to write, but they're not exactly easy to read, especially if written by someone else ("someone else" might be you, but six months earlier).
  • 8
    If they are small, sure

    If they are several lines long... tell me again how they're easy 😏
  • 1
    @deadlyRants That's true actually
  • 4
    Me hearing you say that:
  • 2
    *(they probably are easy, I just haven't spent much time with them)
  • 4
    Given enough time and money, everything is easy.

    Any language is easy if you already are a speaker of it.
  • 2
    it's a language.

    as soon as you speak it often enough to speak it fluently, it makes all so much sense...
  • 1
    If you want to read them after 6+ months, a tool like regexbuddy is a lifechanger!

    www.regexbuddy.com
  • 2
    Regexes aren't usually that difficult. Every time I end up with an unusually long or complicated regex pattern, it's usually because there's a much easier solution that I didn't consider before trying to solve it with regex.
  • 0
    Regular expressions are indeed somewhat easy.
    But what most people are using and what normally is called regular expressions isn't really regular - and therefore a swamp full of pitfalls and crocodiles which also happens to contain some pregnant hippos trained in the art of surprise...
  • 0
    Common ones - yes.
  • 1
    Why do you have to write that? You can find Regex for almost everything online, If you understand it, you can modify them to your needs.
  • 0
    There are some features and some situations (where you really shouldn't use regex) that make it hard but mostly yeah it's relatively easy.
  • 0
    Teach me!
Add Comment