I have a input string:
$str1 = "some usefull text and garbage `~#@!&^*(()}{./";
$str2 = "`~#@!&^*(()}{./";
$result = Exclude with regular expressions all symbols from str1, which are in str2.
$result = "some usefull text and garbage";
What regular expression will simply delete all symbols which I specify? How can I filter it in a right way? Thanx!
You do not need a regular expression for that:
You may want to
trimthe resulting string.