This should work.

<cfset test = "(msg:""My Message Here""; content:""My Content Here"";)">

<cfset temp = refindnocase("msg:([^;]*)",test,1,"yes")>

<cfloop from=1 to="#arraylen(temp.pos)#" index="i">
<cfoutput>#mid(test,temp.pos[i],temp.len[i])#<br></cfoutput>
</cfloop>

--
Marlon Moyer, Sr. Internet Developer
American Contractors Insurance Group
phone: 972.687.9445
fax: 972.687.0607
mailto:[EMAIL PROTECTED]
www.acig.com

> -----Original Message-----
> From: Ian [mailto:[EMAIL PROTECTED]
> Sent: Monday, May 17, 2004 3:39 PM
> To: CF-Talk
> Subject: Regular _expression_ Help
>
> I'm trying to parse a string and pluck a bit of text, but my regex
> isn't working :( Here's a sample string:
>
> (msg:"My Message Here"; content:"My Content Here";)
>
> I want to return My Message Here.
>
> And here's my regex:
>
> refindnocase("msg:[[:print:]]+;", mystring)
>
> I'm using print as mystring may contain any printable characters.
>
> This returns 0 as the position. Any ideas?
>
> Ian
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to