4 ms·
The internet is how we maintain dialogue between peoples when our Governments behave like posturing (arse|ass)+holes. The worse a Government behaves the more (
by Toenex 12y ago
The internet is how we maintain dialogue between peoples when our Governments behave like posturing (arse|ass)+holes. The worse a Government behaves the more (not less) internets the country should receive.
- oneeyedpigeon 12y ago"arseassarseholes"?!
- coderdude 12y agoIt's legit. https://regex101.com/r/qY0tO9/1 https://regex101.com/r/qY0tO9/1
- ColinWright 12y agoTaking your question at face value, some people say "arseholes", some people say "assholes", and some people just say "holes". We can factor out the "holes" to get that some people say "arse", some people say "ass", and some say nothing extra. We get alternation in regular expressions by separating them with a vertical bar, so we have a regular expression: arse | ass That's optional, so we have the regular expression: (arse|ass)+ Put back the "holes" and we get the regular expression: (arse|ass)+holes Clear?
- teddyh 12y agoTaking your confusion at face value, what you should have done is to use a question mark ‘?’ instead of a plus sign ‘+’. Otherwise, the string which oneeyedpigeon posted also matches your regexp.
- ColinWright 12y agoHah! That explains it! Yes, the "+" usually means "1 or more" rather than the "optional" which I assumed. I rarely use either, because in my computing history I've used RexExp engines that didn't use those symbols consistently. I'll leave my comment there as a testament to writing from memory and experience, rather than taking the time to check modern standards, and how things might have changed. Thank you.
- yen223 12y agoNow we have 2 problems.
- deleted 12y ago[deleted]
- chucksmash 12y ago(arse|ass){0,1}holes Is how i would write it, +/- a case insensitive flag.
- commentereleven 12y agoI think you meant "(arse|ass)?holes".