How to delete several non alpha-numeric characters?

shabbysquire

Client
Регистрация
25.11.2012
Сообщения
544
Благодарностей
26
Баллы
28
I'm looking to delete several non alpha-numeric characters, ie: !"£$%^&*()-=+{}[]'#~:;@<>,./?|\`¬

In text processing, I'm using the replace function with regex. When I use: \W, it deletes the characters ok, but it also deletes spaces.

I've also tried using the match regex like: [!"£$%^&*()-=+{}[]'#~:;@<>,./?|\`¬]. It seems to only work if I use 2 or 3 in there, but any more and it fails.

Any suggestions on how to delete these in one pass?

Thanks.
 
Последнее редактирование:

rostonix

Известная личность
Регистрация
23.12.2011
Сообщения
29 067
Благодарностей
5 715
Баллы
113
Try
(symbol1|symbol2|symbol3)

do not forget to escape special characters
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)