anything its going to show up when you ares the select statement.
Adam H
On Wed, 1 Sep 2004 15:25:13 +0200, Pascal Peters <[EMAIL PROTECTED]> wrote:
> 1. This will work if you always have a select statement. If (in some
> cases) there is no select statement, it will return the whole string.
> That is why I usually go with REFind/Mid.
>
> 2. If you are looking for a column list, I would also add some \s in the
> regexp:
>
> "^.*?SELECT\s(.*?)\sFROM\s.*$"
>
> If you don't, a statement like this will get you in trouble:
>
> SELECT MAILTO, MAILFROM, MAILSUBJECT, MAILMESSAGE FROM TBL_MAIL
>
> Pascal
>
> > -----Original Message-----
> > From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> > Sent: 01 September 2004 14:11
> > To: CF-Talk
> > Subject: Re: 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.
> >
> > <cfset newString =
> > rereplacenocase(theQuery,"^.*?SELECT(.*?)FROM.*$","\1")>
> >
> > s. isaac dealey 954.927.5117
> > new epoch : isn't it time for a change?
> >
> > add features without fixtures with
> > the onTap open source framework
> >
> > http://www.sys-con.com/story/?storyid=44477&DE=1
> > http://www.sys-con.com/story/?storyid=45569&DE=1
> > http://www.fusiontap.com
> >
> >
> >
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

