Re: Regex

From: Date: Wed, 31 Mar 2004 16:49:50 +0000
Subject: Re: Regex
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-181956@lists.php.net to get a copy of this message
From: "Burhan Khalid" <phplist@meidomus.com> > 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...

« previous php.general (#181956) next »