[~!#$^*!&()`\\(_+{}|:\"'<>?/,-=\.\[\]\n\t\r] can anyone please tell what does regular expression do?
Asked
Active
Viewed 51 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.
![](../../users/profiles/7616528.webp)
TheMisir
- 2,761
- 1
- 17
- 30
-
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 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