Re: Getting the barcode
| From: | Red Wingate | Date: | Tue, 13 Apr 2004 16:50:20 +0000 |
| Subject: | Re: Getting the barcode | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-183241@lists.php.net to get a copy of this message | ||
it's preg_match_all
Am Dienstag, 13. April 2004 15:05 schrieb Brent Clark:
> Hi All
> I have asked this question before, and the solution was partyly solved, I
> hope hope someone can help me again.
>
> I have a binary file ( readbar ) that I execute with exec().
> and it give me an output as so:
>
> readbar file
> Key1 is 4 barcodes found
>
> Code 39->10301535
> Code 39->10301536
> Code 39->10301537
> Code 39->10301538
>
>
> I need to get all the numbers after the ->
> I there is a carriage return after the number.
>
> My preg_match is like so if(preg_match("#([0-9]{8})#" , $key1, $result)){
> which works for only the first top number, but not for the rest.
> If there away to get this it an array or do a grep on this.
> There can be many lines that begin with Code 39->
>
> If somone can assist that would be most appreciated.
> Im out of ideas on this one
>
> Kind Regards and thank you
> Brent Clark