I am, and I can think of many cases where plain dumb string matching since you know what you’re dealing with beats regex in both performance and maintainability.
You’re a clown that wouldn’t know how to compare two strings without regex even if you got paid 6 figures to do it.
There’s a lot of use cases where regex makes a lot of sense: complex log parsing, determining if a value entered is a valid phone number or email, syntax highlighting, data validation in ML preprocessing, etc. A lot of languages also come with certain features that allow regex to be more efficient than dumb string matching, such as the ability to pre-compile patterns and the flexibility of being able to choose between deterministic and non-deterministic finite automata, should you need efficiency for one use case and flexibility for another. It really depends on what you’re designing and how it’s going to be used, of course.
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmerhumor@lemmy.ml
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
Posts must be relevant to programming, programmers, or computer science.
No NSFW content.
Jokes must be in good taste. No hate speech, bigotry, etc.
Regexes are write-only. No one can understand other peoples regexes
That’s why they don’t belong anywhere outside single line bash commands.
deleted by creator
Use of regex in production code is a sign of incompetence.
deleted by creator
I am, and I can think of many cases where plain dumb string matching since you know what you’re dealing with beats regex in both performance and maintainability.
You’re a clown that wouldn’t know how to compare two strings without regex even if you got paid 6 figures to do it.
There’s a lot of use cases where regex makes a lot of sense: complex log parsing, determining if a value entered is a valid phone number or email, syntax highlighting, data validation in ML preprocessing, etc. A lot of languages also come with certain features that allow regex to be more efficient than dumb string matching, such as the ability to pre-compile patterns and the flexibility of being able to choose between deterministic and non-deterministic finite automata, should you need efficiency for one use case and flexibility for another. It really depends on what you’re designing and how it’s going to be used, of course.
deleted by creator
Perfect pair of words for every solution that involves a regex.
deleted by creator
deleted by creator
He’s a troll. He said earlier today that the holocaust wasn’t bad because “not all the jews died”
He’s just trying to pick a fight
That’s also 'cause other people’s regex are garbage!
Not only other people’s regexes. Mine from last week and before too
Haha