Test, validate and match regular expressions
Matches and captures the first word at the beginning of each line or paragraph. The multiline flag makes ^ anchor to every line start, \b asserts a word boundary, and \w+ captures the leading word characters. With the global flag it selects the opening word of every line, making it useful for extracting headings, topic keywords, or lead terms from multi-line text.