3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/(?<=<@!).+?(?=>)/m'; $str = "Hey <@!123456789> thanks for that, I'll get back to you sooon."; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); // flatten the array result (otherwise it's an array of arrays) $matches = array_merge(...$matches); // Print the entire match result print_r($matches); //Array ( [0] => 123456789 )
Output for git.master_jit, rfc.property-hooks, git.master
Array ( [0] => 123456789 )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
110.18 ms | 1418 KiB | 4 Q