I need the following characters to be taken literally:
"><=/_-. Which of them need to be escaped?
I also need the following string to be taken literally:
" /> Is there anything special I need to do, due to the numbers?
I'm doing a regular expressions find & replace.
I appreciate any help.
12 Answers
Depending on what type of regex is being used (PCRE, .NET, ... whatever) the special characters may differ. If you go to
and select the software and type of regex evaluator at upper left, the page will tell you what characters must be escaped, and in most cases, how to escape them. You can always use an ASCII octal alternation, even though it may be ugly (note that this is an example and does not match your provided characters):
[\032|\060|\061\062]
Then test it, as Seth says, using one of the online regex testers.
1Notepad++ uses Boost regex flavour.
From this list of characters "><=/_-., only . have to be escaped.