@ 2016-11-12T00:34:59Z <?php
//get the first occurance which is |~hey~|
$string = '|~hey~|~look~|~behind~|';
preg_match('!\|~(.*)~\|!', $string, $matched);
var_dump($matched);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 5.6.0 - 5.6.28 , 7.0.0 - 7.0.20 , 7.1.0 - 7.1.25 , 7.2.0 - 7.2.33 , 7.3.0 - 7.3.33 , 7.4.0 - 7.4.33 , 8.0.0 - 8.0.30 , 8.1.0 - 8.1.33 , 8.2.0 - 8.2.29 , 8.3.0 - 8.3.25 , 8.4.1 - 8.4.12 array(2) {
[0]=>
string(23) "|~hey~|~look~|~behind~|"
[1]=>
string(19) "hey~|~look~|~behind"
}
preferences:dark mode live preview ace vim emacs key bindings
154.84 ms | 408 KiB | 5 Q