Hacker News new | ask | show | jobs
by LaputanMachine 417 days ago
I've also seen people use `[\s\S]` to match all characters when they couldn't use `.`.
2 comments

This is a common approach when the regex needs to match any character including newlines; `.` often doesn't.
I generally use `[^]`

Also you can use . with the dotAll /s