Hacker News new | ask | show | jobs
by secondhandvape 4390 days ago
The question mark in the example regex isn't necessary, in case anyone was wondering.
2 comments

It's necessary. It makes the "s" in "hotels" optional, so that the regex can match either "hotel" or "hotels" and then the rest.
Doesn't it imply a search for hotel OR hotels?