3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = 'Re: Response to your ticket [TicketID:159]'; $matches = []; preg_match('/.*\[TicketID:(\d+)\]/', $test, $matches); var_dump($matches[1]);

preferences:
37.7 ms | 402 KiB | 5 Q