-3
4

1 回答 1

3

You could replace all characters that don't match the valid ones:

[^A-Za-z0-9@$_\/.,"():;\-=+&%#!?<>' \n]

The [] means: "any of" and the ^ means: "not". So the whole expression says: Match anything but...

So you'd write:

replace all [^A-Za-z0-9@$_\/.,"():;\-=+&%#!?<>' \n] in the SMS by nothing

For further information (and your further questions ;-)) please have a look at this Howto.

于 2013-01-16T10:10:54.863 回答