Re: Regex find

2003-09-09 Thread Claude Schneegans
>>I cant find a link to download the tag!

Well... there is one to buy it, after that I'm pretty sure you'll find one for 
download ;-)
See http://www.cftagstore.com/index.cfm/page/viewTag/tagId/96

Note that this tag is ranked 5 in the best selling tags.
For just 15 bucks, you cannot go wrong.

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: Regex find

2003-09-09 Thread Jeff Lucido
It is for sale, $15. Watch for the wrap:

http://www.contentbox.com/claude/customtags/tagStore.cfm?p=g

-Original Message-
From: Ryan Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 09, 2003 8:43 AM
To: CF-Talk
Subject: Re: Regex find


I cant find a link to download the tag!

On 9/9/03 14:14, "Claude Schneegans" <[EMAIL PROTECTED]>
wrote:

> You could have a look at CF_REextract at 
> http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
> m?p=hf
> It has been designed especially for this kind of job and can even get
the page
> by
> HTTP for you.
> 
> In your particular case, you could just use:
>  INPUTMODE  = "http"
> INPUT   = "Your http address"
> RE1   = 'robotfile[[:space:]]+"'
> RE2   = '"'
> OUTPUTMODE  = "list"
> OUTPUT   = "your variable name"
>> 
> 
> and get the content in your variable.
> You could also get all occurences if you want in a query, and have it 
> more general depending on the reg expressions you give.
> 
> 

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Re: Regex find

2003-09-09 Thread Ryan Mitchell
I cant find a link to download the tag!

On 9/9/03 14:14, "Claude Schneegans" <[EMAIL PROTECTED]> wrote:

> You could have a look at CF_REextract at
> http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf
> It has been designed especially for this kind of job and can even get the page
> by
> HTTP for you.
> 
> In your particular case, you could just use:
>  INPUTMODE  = "http"
> INPUT   = "Your http address"
> RE1   = 'robotfile[[:space:]]+"'
> RE2   = '"'
> OUTPUTMODE  = "list"
> OUTPUT   = "your variable name"
>> 
> 
> and get the content in your variable.
> You could also get all occurences if you want in a query, and have it more
> general depending on the reg expressions you give.
> 
> 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: Regex find

2003-09-09 Thread Claude Schneegans
You could have a look at CF_REextract at
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf
It has been designed especially for this kind of job and can even get the page by
HTTP for you.

In your particular case, you could just use:


and get the content in your variable.
You could also get all occurences if you want in a query, and have it more general 
depending on the reg expressions you give.

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


RE: regex find form vars in queries?

2001-12-07 Thread Rick Osborne [Mojo]

That solution will only work in Perl.  The CF regex engine cannot handle
non-greedy matching.  If you do more than a little work with regexes you may
want to consider downloading my (completely free) PCRegEx CFX tag, which
gives CF Server Perl-Compatible regexes, including non-greedy matching.
URLs are at the bottom of this message.

As far as a one-line regex for pasting into CFStudio, try this:

]*>(([^#<]|<[^/])*#(Form|URL)\.[^#]+#)+([^#<]|<[^/])*

It worked on the following test cases:

delete from foo where bar = #Form.baz#
delete from foo where bar = #Form.baz# and quux =
1
delete from foo where bar < #URL.fark#
delete from foo where quux = 1
#Form.Query#

That is, it correctly matched all but line 4.  Unfortunately, it will *not*
correctly match the following case:

#PreserveSingleQuotes(Form.Query)#

That is, a case where there is a Form/URL variable, but it is not referenced
directly with octothorpes.  Those are *much* harder to find correctly.  You
can try this:

]*>([^UF<]|F[^o]?[^r]?[^m]?[^.]?|U[^R]?[^L]?[^.]?|<[^/])+(Form\.|
URL\.)([^<]|<[^/])+

But it runs *very* slowly.  It took a few seconds just to find the 5 that
match from this email!  If you can say with confidence that you don't have
function-wrapped Form/URL variables, you should definitely use the first
case.

Actually, your best bet would be a programmatic one in this case, I think.
Much safer.

HTH,
Rick

PCRegEx Links:
Allaire DevEx -
http://devex.allaire.com/developer/gallery/info.cfm?ID=47AA9175-9AFE-11D4-AA
A700508B94F380
My site - http://www.rixsoft.com/ColdFusion/CFX/PCRegEx/


-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 16:29
To: CF-Talk
Subject: Re: regex find form vars in queries?


Sure.  As they say, Perl is greedy. (as is RegEx.) It grabs the biggest
string that matches the criteria.

If you don't want it to, but instead grab the smallest. you must qualify
the search, using the ? character.

So if you have a * or a ?, replace it with a *? or a ??.

(I think)

Jerry Johnson

>>> [EMAIL PROTECTED] 12/07/01 03:58PM >>>
I'm missing something here - it seems like it should be straight-forward.

I need to find all form (and url) scoped variables in cfqueries.

I'm having problems getting the regex to stop at the first  - it
goes to the last one on the page.

Any regex gurus care to give this a try?

thanks,


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: regex find form vars in queries?

2001-12-07 Thread Chris Norloff

Thanks!

Chris Norloff

-- Original Message 
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Re: regex find form vars in queries?

2001-12-07 Thread Jerry Johnson

Sure.  As they say, Perl is greedy. (as is RegEx.) It grabs the biggest 
string that matches the criteria.

If you don't want it to, but instead grab the smallest. you must qualify 
the search, using the ? character.

So if you have a * or a ?, replace it with a *? or a ??.

(I think)

Jerry Johnson

>>> [EMAIL PROTECTED] 12/07/01 03:58PM >>>
I'm missing something here - it seems like it should be straight-forward.

I need to find all form (and url) scoped variables in cfqueries.

I'm having problems getting the regex to stop at the first  - it 
goes to the last one on the page.

Any regex gurus care to give this a try?

thanks,

~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists