3v4l.org

run code in 300+ PHP versions simultaneously
<?php $strings = [ '141.243.1.172 [29:23:53:25] "GET /Software.html HTTP/1.0" 200 233', '[29:23:53:25] "GET /Software.html HTTP/1.0" 200 233', '"GET /Software.html HTTP/1.0" 200 233' ]; $pattern = '/(^.*?)?(\[[0-9]+:[0-9]+:[0-9]+:[0-9]+\] )?(".+?") ([0-9]+) ([0-9-]+)/'; foreach ($strings as $string) { preg_match($pattern, $string, $matches); print_r($matches); }

preferences:
33.04 ms | 405 KiB | 5 Q