\p{Word} is not recognized in regex

I have the following line that is being flagged as an error in the inspections, but works fine:

w = /\p{Word}[\p{Word}'?*]*/

Please sign in to leave a comment.