<?php
$str = '| iptv: { 1 } { 8000 } { localhost.test/categories/music.xml } { golden } { 000000 } { 01 02 03 04 05 06 07 08 09 10 11 12 13 14 } { 1 } | msg: { 1 } { 0 } { Welcome expire: 2020-01-20 } { 0 } { 0 } { 00 } { 0 }';
$rule = '/{[^[{}]*\h(\S+\.xml|\d{4}-\d{2}-\d{2})\h}/i';
preg_match_all($rule, $str, $matches);
print_r($matches[1]);
- Output for 7.1.25 - 7.1.30, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.25 - 8.1.28, 8.2.12 - 8.2.19, 8.3.0 - 8.3.7
- Array
(
[0] => localhost.test/categories/music.xml
[1] => 2020-01-20
)
- Output for 8.1.0 - 8.1.24, 8.2.0 - 8.2.11
- Array
(
[0] => 2020-01-20
)
preferences:
129.18 ms | 402 KiB | 171 Q