Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've also seen people use `[\s\S]` to match all characters when they couldn't use `.`.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: