I have this string in $output:
attack-responses.rules attack-responses_IPS.rules backdoor.rules backdoor_IPS.rules
I want to have this in $array:
$array[0]=attack-responses.rules
$array[1]=attack-responses_IPS.rules
$array[2]=backdoor.rules
I mean when it reaches to .rules(something like *.rules) it must get the substring
I didn’t know how to do it with regex or by another solution
Thanks in advance
a simple
explode()should do it