#PHP, 61 bytes
PHP, 61 bytes
<?=preg_filter("_<\?=[aefiglprtv$(\_[\],)\\;1\"]_",$argv[1]);
takes input from first command line argument.
no regex, 74 bytes
for(;""<$c=$argv[1][$i++];)if(strstr("aceghiosrtv()$<=[1]\;\"",$c))echo$c;
takes input from first command line argument. Run with -nr
.
Note: ;
needs no escaping; so PHP takes the backslash before the semicolon literally.