Can anybody help me writing a regular expression to replace these characters with a empty string. Character list is given below.
public static char[] delimiters = { ' ', '\r', '\n', '?', '!', ';', '.', ',', '`', ':', '(', ')', '{', '}', '[', ']', '|', '\'', '\\', '~', '=', '@', '>', '<', '&', '%', '-', '/', '#' };
Here’s the regex you want:
For example:
FYI, the general notation for this sort of thing in regular expressions is “/[…]/” – means, “match any character inside the brackets”