News for hackers. Stuff that matters.
Re:The Greatest Regex Trick Ever (2014) by kogus on Thursday July 08, 2021 @03:05PM (#27776387)
This is a great trick. It says something about RegEx syntax that matching a simple rule with a relatively clear expression is a major accomplishment.
Re:The Greatest Regex Trick Ever (2014) by nytgop77 on Thursday July 08, 2021 @06:00PM (#27778143)
Yup. Regex is not a silver bullet for "match stuff", and it is wrong(ish) tool for following jobs:

- context sensitive matching

- matching with multi-char-exclusions

(regex is happy the most, when it's used to match "regular language" things)

Re:The Greatest Regex Trick Ever (2014) by bear8642 on Friday July 09, 2021 @12:05AM (#27780375)
Know saying wrongish, but for multi-char-exclusion matching, can't you just do [^chars]?

So to search for words without any vowels just 'grep [^aeiou]'?

Re:The Greatest Regex Trick Ever (2014) by alisonkisk on Thursday July 08, 2021 @08:19PM (#27779197)
It's semantics, not syntax. It's one of the simplest and oldest search engines in the history of computing; obviously a more complex engine can provide more robust semantics.