position of the match. You need to extract the match yourself (and use
subexpressions for that).
<cfscript>
stTmp = REFindNoCase("SELECT\s+(.*?)\s+FROM\s",theQuery,1,true);
if(stTmp.pos[1])
NewString = Mid(theQuery,stTmp.pos[2],stTmp.len[2]);
else NewString = "no columns found !!";
</cfscript>
I've written a UDF that does these things, but it hasn't been approved
yet.
Pascal
> -----Original Message-----
> From: Charles Heizer [mailto:[EMAIL PROTECTED]
> Sent: 01 September 2004 08:56
> To: CF-Talk
> Subject: REFind Help ...
>
> Hello,
> I have a string and I need to get a certain part out of it and pipe it
in
> to another variable.
>
> Here is what I have --
>
> <cfset NewString = REFind("SELECT(.*?)FROM",theQuery)>
> Here are all of the columns in your query #NewString#
>
> What I get is a "1", I was really looking for the string.
>
> Thanks,
> - Charles
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

