Preface: This will turn out to be a bad case of brain-malfunction. In any case, the precedence is surprising and I haven't checked the FullForm... the one thing we tell every new user. Oh my
This question is for reference. I believe this is a bug. Assume you want to match 3 cases: 123, .123, and (123. or 123.123). The documentation of StringExpression states:
Let's try both versions we can use:
n1 = {DigitCharacter .., "." ~~ DigitCharacter ..,
DigitCharacter .. ~~ "." ~~ DigitCharacter ...};
n2 = DigitCharacter .. | "." ~~ DigitCharacter .. |
DigitCharacter .. ~~ "." ~~ DigitCharacter ...;
Now you will note that the created regular expressions look differently
First[StringPattern`PatternConvert[#]] & /@ {n1, n2}
{ "(?ms)(?:\\d+|\\.\\d+|\\d+\\.\\d*)", "(?ms)(?:\\d+|\\.)(?:\\d+|\\d+)\\.\\d*" }
and in fact, they have different semantics
StringMatchQ[".1", #] & /@ {n1, n2}
(* {True, False} *)
Any suggestions, why this shouldn't be a bug?

StringPattern\PatternConvert`? – Mike Honeychurch Jan 24 '18 at 04:23Tracethat I used to solve a users problem some years ago. It is quite handy at times. – halirutan Jan 24 '18 at 04:34