The Character class \w matches any word character, and \W matches anything that isn’t a word character.
So, [\w\W] matches anything, including a newline
for example removing c style comments
another example is getting all text within a div
Usually we use it as (.*?) but this matches all characters except newline.
So the alternate char class w is used to find all chars and non chars.
The question mark is used to include laziness because the * chars is greedy.
See this for more modifiers
For a long time i have been looking for this