Question
The "numeric-like" regex pattern in section 7.2 seems too permissive or perhaps incorrect. For instance, the pattern is
/^-?\d+(?:.\d+)?(?:e[+-]?\d+)?$/i
However, this would mean the first non-capturing group (?:.\d+) uses a dot which captures all, and would capture something like a123. It seems like the intended behavior is to capture decimal portions, thus the non-capturing group should be (?:.\d+)
(note the escaped dot character).
Is this intended and I am missing something or misreading it?
Specification Section
Section 7.2 Quoting Rules for String Values
Source of Confusion
The "numeric-like" regex pattern in section 7.2 seems too permissive or perhaps incorrect. For instance, the pattern is
/^-?\d+(?:.\d+)?(?:e[+-]?\d+)?$/i
However, this would mean the first non-capturing group (?:.\d+) uses a dot which captures all, and would capture something like a123. It seems like the intended behavior is to capture decimal portions, thus the non-capturing group *should* be (?:\.\d+)
(note the escaped dot character).
Example Case
The pattern in the spec would match 12a34, which is not a number.
Use Case / Context
No response
Reference Implementation Behavior
No response
Checklist
Question
The "numeric-like" regex pattern in section 7.2 seems too permissive or perhaps incorrect. For instance, the pattern is
/^-?\d+(?:.\d+)?(?:e[+-]?\d+)?$/i
However, this would mean the first non-capturing group (?:.\d+) uses a dot which captures all, and would capture something like a123. It seems like the intended behavior is to capture decimal portions, thus the non-capturing group should be (?:.\d+)
(note the escaped dot character).
Is this intended and I am missing something or misreading it?
Specification Section
Section 7.2 Quoting Rules for String Values
Source of Confusion
Example Case
Use Case / Context
No response
Reference Implementation Behavior
No response
Checklist