3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = 'H: 290‐314 P: 280‐301+330U+200B+331string‐305+351+338‐308+310 [2]'; if (preg_match_all('~(?:\G(?!\A)(?:[^\d\s]*200B)?|P:\h*)[^\d\s]*\K(?!200B)\d+~', $text, $matches)) { print_r($matches[0]); }

preferences:
36.23 ms | 405 KiB | 5 Q