In find
and findstr
, there are some special characters that require some caution on it.
There is only one character that needs escaping - "
quote. To escape it, simply add another quote next to it. So "
becomes ""
. Pretty simple.
Findstr
comes with plenty of characters to escape, so please be very cautious. Using \
, we can escape special characters. Here's a list of special characters to escape
Character | Escaped Result |
---|---|
\ | \\ |
[ | \[ |
] | \] |
" | \" |
. | \. |
* | \* |
? | \? |