Comment on Regex Isn't Hard (2023)parentComments−LaputanMachine1yI've also seen people use `[\s\S]` to match all characters when they couldn't use `.`.−tomsmeding1yThis is a common approach when the regex needs to match any character including newlines; `.` often doesn't.−dimava1yI generally use `[^]`Also you can use . with the dotAll /s
Comments
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