Hacker News new | past | comments | ask | show | jobs | submit login

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.



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)


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]'?


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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: