4 ms·
> So if you're trying to match a string without a newline at the end, you can't only use $ in Python! My expectation was having multiline mode disabled wo
by mmh0000 3y ago
> So if you're trying to match a string without a newline at the end, you can't
only use $ in Python! My expectation was having multiline mode disabled
wouldn't have had this newline-matching behavior, but that isn't the case.
I would argue this is correct behavior, a "line" isn't a "line" if it doesn't end with \n.[1]
> 3.206 Line - A sequence of zero or more non- <newline> characters plus a terminating <newline> character.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1...
- remram 3y agoWhy should it be a "line" though? The whole point is that people pass in a string, they don't care about lines.