I had been fiddling with php and needed to extract a string literal. Note that there are many many ways to solve this but I’d like to go with this:
<?php $str = 'Found PID 0x1011, stream id 0xE0 = Video Stream 0'; preg_match('/id (0x[0-9a-f]+) = Video/i', $str, $m); print_r($m[1]); ?>