How to declare mandatory regex block #1113
Unanswered
IgorStepanov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I wrote the following code:
I expect that "123-foo" will be accepted, but "-bar" will be rejected (because
\d+needs one or more digits).However "-bar" is accepted.
Of cource, I use much complex regex than
/^\d+$/, I reduced the example for clarity.Beta Was this translation helpful? Give feedback.
All reactions