Skip to content

Instantly share code, notes, and snippets.

@azizshamim
Created October 4, 2010 22:01
Show Gist options
  • Save azizshamim/610533 to your computer and use it in GitHub Desktop.
Save azizshamim/610533 to your computer and use it in GitHub Desktop.
#!/usr/bin/php -q
<?php
# IN PHP
preg_match("/welcome!?/", "welcome is the new welcome!", $matches);
print "In PHP, the regex matches: ".$matches[0]."\n";
?>
$ In PHP, the regex matches: welcome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment