- intval: documentation ( source)
- preg_replace: documentation ( source)
<?php
// m = re.search('Episode (\d+)', 'series[Episode 37]-03th_July_2010-YouTube', re.IGNORECASE)
$string = "Hello! 123 test this? 456. done? 100%";
$int = intval(preg_replace('Episode (\d+)', '', $string), 10);
echo $int;