// assign a regex pattern to match the from page contents $pattern = '//Ui'; // get all matches preg_match_all($pattern,$content,$matches);