[~!#$^*!&()`\\(_+{}|:\"'<>?/,-=\.\[\]\n\t\r] can anyone please tell what does regular expression do?
Asked
Active
Viewed 55 times
1 Answers
0
It simply matches for those symbols: ~!#$^*!&()`(_+{}|:"'<>?/,-=.[]\n\t\r
\n
- New line symbol
\t
- Tab symbol
\r
- New line symbol
Check out regex explainer.

TheMisir
- 4,083
- 1
- 27
- 37
-
BTW, I'm sure there is a typo in this regular expression, the author has forgotten a backslash in front of the minus sign. So instead of matching just a comma, minus sign, and equal sign, `,-=` matches all characters between comma and equal sign. – Alex Sveshnikov Mar 04 '20 at 08:00
-
FYI: `\n` matches a linefeed and `\r` a carriage return (nothing to do with “DOS mode”). – Toto Mar 04 '20 at 10:07