Skip to content

Instantly share code, notes, and snippets.

@potato2003
Created August 19, 2013 12:05
Show Gist options
  • Save potato2003/6268417 to your computer and use it in GitHub Desktop.
Save potato2003/6268417 to your computer and use it in GitHub Desktop.
http://togetter.com/li/429782 UTF8モードだとalnumでひらがながマッチする
<?php
preg_match('/^([[:alnum:]]*)([[:^alnum:]]*)$/u', 'aaaaああああ', $matches);
if ($matches[0] === 'aaaaああああ') {
echo 'MATCH!'
}
/*
UTF8モードだとalnumでひらがながマッチする
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment