Describe the bug
Regex matching can behave differently on different OSes. This basically comes down to
how the system regex(3) library behaves. e.g. on GNU+Linux (glibc), backslash character
classes (e.g. \s for whitespace, \w for alnum + underscore) work fine, but they are not
recognised on FreeBSD and you are restricted to POSIX definitions (e.g. [[:alpha:]]).
Expected behavior
We need to decide on this - whether we want to normalise the behaviour across OSes by switching regex library to something that behaves consistently, or whether we leave it as a caveat and simply document it clearly.
Describe the bug Regex matching can behave differently on different OSes. This basically comes down to how the system
regex(3)
library behaves. e.g. on GNU+Linux (glibc), backslash character classes (e.g.\s
for whitespace,\w
for alnum + underscore) work fine, but they are not recognised on FreeBSD and you are restricted to POSIX definitions (e.g.[[:alpha:]]
).Expected behavior We need to decide on this - whether we want to normalise the behaviour across OSes by switching regex library to something that behaves consistently, or whether we leave it as a caveat and simply document it clearly.