When the unicode flag is set, escaped dashes in a character class result in an "invalid Unicode sequence" error. See snippet for an example, /a[a\\-z]/u [https://astexplorer.net/#/gist/4ea2b52f0e546af6fb14f9b2f5671c1c/49dafda5429858220f62387740fd4226cdc3dde0](https://astexplorer.net/#/gist/4ea2b52f0e546af6fb14f9b2f5671c1c/49dafda5429858220f62387740fd4226cdc3dde0)