How to get all the links after a specific string?

Can anyone suggest the regular season for pulling out all of the pictures that are after the window.runParams.imageBigViewURL ?
Prompt

Can't find what you need from imageBigViewURL, for the website a lot of pictures. It is necessary to proceed from the container imageBigViewURL

https://regex101.com/r/hX5zA7/1
July 8th 19 at 16:33
2 answers
July 8th 19 at 16:35
Solution
What is a string? This is a set of characters between \n (\r\n). For this you need your layout to break through this pointer
html.split('\n');

and then in a loop to iterate over this array. And as soon as the number of iterations of the loop will be >= than the number "a" row you start the parser.
heh. Marked only the implementation of my algorithm in code. Help people that. - Brody_Dickins commented on July 8th 19 at 16:38
: hmm, I thought it was a one-button "solution" to poke, it turns out two) - federico.Moen55 commented on July 8th 19 at 16:41
July 8th 19 at 16:37
Solution
Implementation of the above
$t = '<script type="text/javascript">
if(!window.runParams) {
window.runParams = {};
}
window.runParams.imageServer="http://i00.i.aliimg.com";
window.runParams.imageDetailPageURL="//www.aliexpress.com/item-img/2015-Winter-Beanies-Solid-Color-Hat-Unisex-Plain-Warm-Soft-Beanie-Skull-Knit-Cap-Hats-Knitted/32462312884.html";
window.runParams.imageBigViewURL=[
"http://g02.a.alicdn.com/kf/HTB1JJG8JpXXXXb7XFXXq6xXFXXXs/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки.jpg",
"http://g02.a.alicdn.com/kf/HTB1frm7JpXXXXbFXFXXq6xXFXXXo/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки.jpg",
"http://g02.a.alicdn.com/kf/HTB1BsaSJpXXXXa3aXXXq6xXFXXX9/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки.jpg",
"http://g02.a.alicdn.com/kf/HTB1tUYfJpXXXXbVXXXXq6xXFXXXc/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки.jpg",
"http://g04.a.alicdn.com/kf/HTB1LRSUJpXXXXaeaXXXq6xXFXXXr/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки.jpg",
"http://g02.a.alicdn.com/kf/HTB1VSi8JpXXXXbUXFXXq6xXFXXXU/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки.jpg"
];
window.runParams.mainBigPic = "http://g02.a.alicdn.com/kf/HTB1JJG8JpXXXXb7XFXXq6xXFXXXs/2015-зимние-шапочки-сплошной-цвет-шляпа-мужская-обычная-теплый-мягкий-шапочка-череп-вязаные-Touca-Gorro-шапки111.jpg";
</script>';
$a = explode("\n", $t); ///$a = split("\n", $t);
$qti = 0;
$search = array();
foreach ($a as $value){
$qti++;
 if ($value == 'window.runParams.imageBigViewURL=['){
 $i = $qti;
}
 if ($qti >= $i){
 if ( preg_match('~(http.*jpg)~',$value, $res)){
 $search[]= $res['0'];
}
}
}

echo '
';
var_dump($search);
6d83b50ad0fe4c8fbc7c64a66665b257.png

Find more questions by tags Regular expressionsJavaScriptPHP