I've been a professional C, Perl, PHP and Python developer.
I'm an ex-sysadmin from the late 20th century.
These days I do more Javascript and CSS and whatnot, and promote UX and accessibility.
That first, "random" example you gave is a poor one because it's written badly. You wouldn't need to escape most of those characters when they're in a character class, and the whole thing would look less like a zebra!
JavaScript developer, technology passionate, Ubuntu evangelist, ex mountain guide, active football player, inactive surfer, professional backpacker and hitchhiker.
It is indeed a very poor example but I really meant random. I had just googled "regex", "stackoverflow" and "javascript" and that was the first result that showed up.
I have connections neither with the person who created the question nor with the people who answered it. 😉 For that reason I have included the source.
From now on I'll always see that example in particular as a zebra. 🦓
Thanks for that. 🤣
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That first, "random" example you gave is a poor one because it's written badly. You wouldn't need to escape most of those characters when they're in a character class, and the whole thing would look less like a zebra!
Hi, Ben. Thanks for your comment. :)
It is indeed a very poor example but I really meant random. I had just googled "regex", "stackoverflow" and "javascript" and that was the first result that showed up.
I have connections neither with the person who created the question nor with the people who answered it. 😉 For that reason I have included the source.
From now on I'll always see that example in particular as a zebra. 🦓
Thanks for that. 🤣