in reply to Unicode regular expressions

\X isn't a class. It can match multiple characters.
/^(?:\X|[\w -])+$/

\X matches the space, the dash and everything in \w, so the above simplifies to

/^\X+$/