Skip to main content
Commonmark migration
Source Link

#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.

#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.

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.

Source Link
Titus
  • 14.8k
  • 1
  • 24
  • 41

#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.