Created
May 8, 2014 01:43
-
-
Save beatak/5f749af678311d8100e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$str = "あAいうえおaかAきくけこaさAしすせそ"; | |
$pattern = "a"; | |
mb_ereg_search_init($str, $pattern, "i"); | |
while (mb_ereg_search()) { | |
print_r( [mb_ereg_search_getpos(), mb_ereg_search_getregs()] ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
options for mb_ereg_* are all defined in
http://us3.php.net/manual/en/function.mb-regex-set-options.php.
not sure why the syntax is super different from other regex functions…