I'm using PHP, and in a server folder it contains files with these names:
T3497012@16-01-02:21@[email protected]
T3497012@16-01-02:22@[email protected]
T3497012@16-01-02:23@[email protected]
T3497012@16-01-02:24@[email protected]
T3497012@16-01-02:25@[email protected]
T3497012@16-01-02:26@[email protected]
T3497012@16-01-02:27@[email protected]
T3497012@16-01-02:28@[email protected]
T9997012@16-01-02:29@[email protected]
T1997012@16-01-02:30@[email protected]
T1997012@16-01-02:31@[email protected]
T9997012@16-01-02:32@[email protected]
T9997012@16-01-02:33@[email protected]
Each word of this between @
means something, analyzing the first file for example:
T3497012@16-01-02:21@[email protected]
T3497012
is the id of the user who saved the file, 16-01-02:21
is the date and time it did it, GEOTIMBRAG1A
is the host name Disco
type and .json
is the extension of the file.
I need to assign to an array all filenames that are of the T9997012
id like this:
$array[0] = "T9997012@16-01-02:29@[email protected]";
$array[1] = "T9997012@16-01-02:32@[email protected]";
$array[2] = "T9997012@16-01-02:33@[email protected]";
I tried to use preg_match () but I could not.
I also need an array with all hosts (GEOTIMBRAG1A) of all the files in an id. later I'll need an array with all type (disk, Panser) of an id.