3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php preg_match('#https?://(?:plus\.)?google\.com/\+?(\w+)#i', 'https://plus.google.com/+ForeigñNáme/', $matches); var_dump($matches);
based on rCvkW
Output for 4.3.0 - 7.2.0
array(2) { [0]=> string(31) "https://plus.google.com/+Foreig" [1]=> string(6) "Foreig" }