I think you can always help with understanding of regex by commenting and naming, just like you would with other code items.
# number or plus as first character, number or certain characters as other characters BASIC_PHONE_REGEX = "^[0-9\+(][0-9)(\-\.ext\s]+"
Yep, very good. Perhaps even add the expected result as part of the comment.
When tdd is viable, rex can be expressed very thoroughly in tests. They need to be tested differently anyway because of their versatility, so those tests go a long way to show what it should/not do
regex101.com/ is a godsend when it comes to understanding someone else's line noise.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
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.
I think you can always help with understanding of regex by commenting and naming, just like you would with other code items.
Yep, very good. Perhaps even add the expected result as part of the comment.
When tdd is viable, rex can be expressed very thoroughly in tests. They need to be tested differently anyway because of their versatility, so those tests go a long way to show what it should/not do
regex101.com/ is a godsend when it comes to understanding someone else's line noise.