<?php $re = "/#[0-9_\\p{L}]+/u"; $str = "This is my testing string, look at the hashtags and see that the multibyte ones are ignored. #php #regex #my #multibyte #åäö #öl #läsa #drickaöl #tags #are #being #ignored"; preg_match_all($re, $str, $matches);print_r($matches);
Standard input is empty
Array ( [0] => Array ( [0] => #php [1] => #regex [2] => #my [3] => #multibyte [4] => #åäö [5] => #öl [6] => #läsa [7] => #drickaöl [8] => #tags [9] => #are [10] => #being [11] => #ignored ) )
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!