i received a big string that has lots of margin in the left side(probably different sizes of margins) ! My current code doesn't remove it ? is there away to remove all those margins for entire bigstring content and all start lines start without any margin!
$dataValue = $_POST['bigString'];
$dataValue2 = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $dataValue);
the data has this type of margin:
#EXTM3U
#EXTINF:-1, title1
http://somesite.com/2.m3u8
#EXTINF:-1, title2
http://somesite.com/2.m3u8
#EXTINF:0, title 3
and i want to the the string to be like this:
#EXTM3U
#EXTINF:-1, title1
http://somesite.com/2.m3u8
#EXTINF:-1, title2
http://somesite.com/2.m3u8
#EXTINF:0, title 3