Thanks for the explication.
About the context, this regex comes from a piece of code that is highly dependent of it. The code works, so nobody touches it, but at the same time nobody knows what the hell that regex exactly does.
again, thanks.
Thanks for the explication.
About the context, this regex comes from a piece of code that is highly dependent of it. The code works, so nobody touches it, but at the same time nobody knows what the hell that regex exactly does.
again, thanks.
^(\d+|)$
nothing, that's the problem.
it doesn say (\d{3}|\d{5}|.....) or anything, just \d+|
<quote> To select between several alternatives, allowing a match if either one is satisfied, use the pipe "|
" symbol to separate the alternatives. </quote>
Exactly what I mean : what is the pipe-symbol doing at that exact position ? it does not give any alternatives.
(\d+|) ?? selection between \d+ and \d+ and \d+ ?????? you'd think (\d+) would do the job, no ? so why the pipe-symbol ?
Yeah, right :)
at the beginning of ..... any digit or any series of digits.... until exact end of string
but what i cannot make sense of is the |-character in that exact combination.
expression = "^(\d+|)$"
WTF is it doing there ? and how does it alter the exact signification of the regex ?
Thanks for the links anyway. They're very useful for quick researches.
Does anyone have a clue about the exact explanation of this regular expression (used in .NET app) ?
expression = "^(\d+|)$"
thx