1 2 3 4 5 6 | <?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match('/(?:type|plan)-([^\s]+)/', $string, $matches); var_dump($matches); |
-
upload with new input
-
result: Success time: 0.02s memory: 13112 kB returned value: 0
<?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match_all('/(type|plan)/', $string, $matches); var_dump($matches);array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
<?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match_all('/-([^\s]+)/', $string, $matches); var_dump($matches);array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
<?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match_all('/(?:(?:type|plan)-([^\s]+))/g', $string, $matches); var_dump($matches);array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
<?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match_all('/(?:(?:type|plan)-([^\s]+))/', $string, $matches); var_dump($matches);array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
<?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match('/(?:(?:type|plan)-([^\s]+))/', $string, $matches); var_dump($matches);array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
<?php $string = 'something plan-free something-else type-fuckoff'; $matches = array(); $regex = preg_match_all('/(?:type|plan)-([^\s]+)/', $string, $matches); var_dump($matches);array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" } -
result: Success time: 0.02s memory: 13112 kB returned value: 0
array(2) { [0]=> string(9) "plan-free" [1]=> string(4) "free" }



