Been testing a codebase migration from 7.3 to 7.4, and the only thing that affected us is the PCRE update under PHP.
Currently this regex:
/(\>)([\R\s\v\h]*)((\&|\#)?nbsp\;|(\&|\#)nbsp)*([\R\s\v\h]*)(\<)/
Throws a nasty warning:
Compilation failed: escape sequence is invalid in character class at offset 7
And indeed, if I remove the \R, the warning disappears, but of course the behaviour changes.
I have read the PCRE2 syntax manual, and they list \R as a valid newline sequence character type (see it here). What's up with it then? Why does it throw a warning for it?