He/Him; Senior Software Developer, IT Swiss-army-knife, 3 programming blades, 1 hardware, 1 networking and infrastructure and a corkscrew. The tweezers have long since been lost. (Recent ADHD diag.)
When I use RegEx's I try to follow these rules (more like a guideline 🏴☠️)
Keep the inputs shorter (don't usually regex over whole documents)
Don't do too much in each regex (follow up on matches to further refine if needed)
Don't let the user put in regex (unless you're building a tool for super-advanced-users)
Expect non-matches and handle those
Over-Test, test, test again, automate the tests, and ensure any related issue/bug reported is added as a case to the tests.
My context is usually used in file name parsing as my users are supposed to name their documents in a meaningful, structured way for ingestion into other systems. The exception report (files not match-able) typically runs longer than the source code ;) Turns out people just can't spell common words consistently when it matters. (I'm no exception)
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.
When I use RegEx's I try to follow these rules (more like a guideline 🏴☠️)
My context is usually used in file name parsing as my users are supposed to name their documents in a meaningful, structured way for ingestion into other systems. The exception report (files not match-able) typically runs longer than the source code ;) Turns out people just can't spell common words consistently when it matters. (I'm no exception)