php-general | 2004032
Date: 03/31/04
- Next message: John W. Holmes: "Re: [PHP] determining number of rows in a mysql table"
- Previous message: Andrew Hauger: "Re: [PHP] File Download link not working in PHP 4.3.4"
- In reply to: Burhan Khalid: "Re: [PHP] Regex"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: "Burhan Khalid" <phplist <email protected>>
> Brent Clark wrote:
> > Hi all
> >
> > does anyone know of a regex expression to get only the number number
from after the Code 39
> >
> > Kind Regards
> > Brent Clark
> >
> > 1 barcodes found Code 39->10005215
>
> $barcodes = "Code 39->10005216";
>
> $parts = explode(">",$barcodes);
> echo "Number is ".$parts[1];
Something like this would work, but you'd have to skip $part[0], like he
does, then take the substr($part[x],0,8) of each element to get the numbers
(since you have multiple lines of numbers).
Use what you understand. :)
---John Holmes...
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: John W. Holmes: "Re: [PHP] determining number of rows in a mysql table"
- Previous message: Andrew Hauger: "Re: [PHP] File Download link not working in PHP 4.3.4"
- In reply to: Burhan Khalid: "Re: [PHP] Regex"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

