Does [\S\s]* matches every string actually,the same as .*?

Accepted Answer

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.

Written by Kobi
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki