I'm trying to search for a phrase inside a .txt file using preg_match but it never gives me matches. Strange thing is if I try copying and pasting the file content in a sandbox I get good matches. This is what I tried:
$txtUrl='https://www.sec.gov/Archives/edgar/data/1411579/000110465920131796/0001104659-20-131796.txt';
$getTextS3 = file_get_contents($txtUrl, true);
$str=strip_tags($getTextS3);
$re = '/Shares of Class A common stock/i';
preg_match_all($re, $str, $match);
var_dump($match);