I am trying to make a PHP script that extracts all the ID numbers from a document.
This document has a lot of text and the ID numbers i want to return a string containing each ID number.
An example of a text document i would run the script on:
Chinese STID_1:1:12284 ate at 18:36
African STID_5:1:12238 ate at 18:40
African STID_1:7:12242 ate at 18:57
After the script runs I want it to return the ID numbers:
STID_1:1:12284, STID_5:1:12238 and STID_1:7:12242
I already know how to open a file all i need is a function that can find the ID numbers with STID in them.
Thanks
This document has a lot of text and the ID numbers i want to return a string containing each ID number.
An example of a text document i would run the script on:
Chinese STID_1:1:12284 ate at 18:36
African STID_5:1:12238 ate at 18:40
African STID_1:7:12242 ate at 18:57
After the script runs I want it to return the ID numbers:
STID_1:1:12284, STID_5:1:12238 and STID_1:7:12242
I already know how to open a file all i need is a function that can find the ID numbers with STID in them.
Thanks