Re: Matching
| From: | Ashley Sheridan | Date: | Sat, 31 Jan 2009 12:32:28 +0000 |
| Subject: | Re: Matching | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-287476@lists.php.net to get a copy of this message | ||
On Fri, 2009-01-30 at 21:33 -0500, Eric Butera wrote:
> On Fri, Jan 30, 2009 at 9:28 PM, Ron Piggott <ron.php@actsministries.org> wrote:
> > How do I determine the value of tx from this string?
> >
> >
> > page/words_from_the_well_checkout/?tx=8UM53005HH344951T&st=Completed&amt=0.01
> >
> > My desired answer is: 8UM53005HH344951T
> >
> > I am trying to capture the serial number which follows tx= and ends
> > immediately before the &
> >
> > Ron
> >
>
> http://us.php.net/parse_str
>
> --
> http://www.voom.me | EFnet: #voom
>
Go regular expressions...
/tx=([^\&]+)/
then do a preg_match with the string using the $matches array argument.
$matches[1] should be your value.
Ash
www.ashleysheridan.co.uk