What does [\S\s]* mean in regex in PHP?

By default . doesn’t match new lines – [\s\S] is a hack around that problem.
This is common in JavaScript, but in PHP you can use the /s flag to to make the dot match all characters.

Leave a Comment