Bailey, Neal wrote:
> When I cfdump the cookie rsAgent I get this:
> NeedUpdate=1&Recognition=Support&EntityID=0000000009&AgentName=Neal
> Bailey&Rank=80&AgentNumber=@@09
>
> I then want to set the EntityID as a Session variable. But my problem is I
> can't figure out how to grab just the EntityID.
>
> I guess I need to convert it to a list using & as a delimiter or something.

That would be one alternative... but I suspect you could get it out of
there with a regular _expression_...

This code ALMOST works except the regex is greedy, and it wouldn't work
if EntityID was the last field...

<CFSET FOO =
"NeedUpdate=1&Recognition=Support&EntityID=0000000009&AgentName=Neal
Bailey&Rank=80&AgentNumber=@@09">
<CFSET retval = REFindNoCase("EntityID=.*&",FOO,1,"TRUE")>
<CFDUMP VAR="#retVal#">
<PRE>
12345678901234567890123456789012345678901234567890
<CFOUTPUT>#Mid(FOO,retVal.POS[1],retVal.LEN[1])#</CFOUTPUT>
</PRE>

  - Rick
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to