Test, validate and match regular expressions
Matches sequences of word characters (letters, digits, underscores), single apostrophes, or individual spaces. With the global flag, it tokenizes simple label text by extracting words while separately capturing apostrophes and spaces—useful for handling names like O'Brien or contractions like don't in lexical analysis or text tokenization tasks.