Re:Regex character "$" doesn't mean "end-of-string"
by rerdavies on Wednesday March 20, 2024 @11:41AM
(#39768159)
The opengroup spec says no such thing.
[ Parent
| on HN ]
Re:Regex character "$" doesn't mean "end-of-string"
by simonh on Wednesday March 20, 2024 @12:35PM
(#39768922)
3.206 Line
A sequence of zero or more non- <newline> characters plus a terminating <newline> character.
See also ‘3.403 Text File’ for the definition of a text file. No new line characters, no lines. No lines, not a text file.
Re:Regex character "$" doesn't mean "end-of-string"
by wtetzner on Friday March 22, 2024 @09:56AM
(#39790819)
> No lines, not a text file.
That seems like a broken (maybe just bad?) definition/specification to me. A blob of JSON in a file isn't "text" if there's no newline character trailing it?
Re:Regex character "$" doesn't mean "end-of-string"
by simonh on Saturday March 23, 2024 @05:42PM
(#39803294)
There are other definitions of a text file than the opengroup spec, particularly for specific OS platforms. I’m not sure what convention JSON follows.
As a spec it’s fine. It defines a text file in such a way that you can easily write code to process such a file deterministicaly.