RE: REGEX

2002-08-15 Thread Adrian Lynch

I don't think you need a regex, although it might be faster.

Using double quotes as the delimiter, all the even numbered elements will be
the ones you want to convert. Grab these then replace all the commas.

Ade

-Original Message-
From: Mark Smyth [mailto:[EMAIL PROTECTED]]
Sent: 15 August 2002 14:02
To: CF-Talk
Subject: REGEX


> Anyone got a regex hanging around which would search a comma delimited
> file e.g.
> 
> 1,f,g,h,4,56,"lk,lk,re,tr,yt,",2,3,4,"er,re,tr,"
> 
> locate text within the speech marks and replace the commas with another
> character (e.g "¬"), thereby producing
> 
> 1,f,g,h,4,56,"lk¬k¬re¬tr¬yt",2,3,4,"er¬re¬tr¬"
> 
> many thanks
> Mark
> 
> Mark Smyth
> Systems Union eBusiness Solutions
> 01865 880800
> www.systemsunion.net
> 
> 

__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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

2002-08-15 Thread Mark Smyth

good thinking that man

thanks

-Original Message-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]]
Sent: 15 August 2002 14:18
To: CF-Talk
Subject: RE: REGEX


I don't think you need a regex, although it might be faster.

Using double quotes as the delimiter, all the even numbered elements will be
the ones you want to convert. Grab these then replace all the commas.

Ade

-Original Message-
From: Mark Smyth [mailto:[EMAIL PROTECTED]]
Sent: 15 August 2002 14:02
To: CF-Talk
Subject: REGEX


> Anyone got a regex hanging around which would search a comma delimited
> file e.g.
> 
> 1,f,g,h,4,56,"lk,lk,re,tr,yt,",2,3,4,"er,re,tr,"
> 
> locate text within the speech marks and replace the commas with another
> character (e.g "¬"), thereby producing
> 
> 1,f,g,h,4,56,"lk¬k¬re¬tr¬yt",2,3,4,"er¬re¬tr¬"
> 
> many thanks
> Mark
> 
> Mark Smyth
> Systems Union eBusiness Solutions
> 01865 880800
> www.systemsunion.net
> 
> 


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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

2002-08-15 Thread S . Isaac Dealey

> I don't think you need a regex, although it might be faster.

> Using double quotes as the delimiter, all the even numbered
> elements will be the ones you want to convert. Grab these
> then replace all the commas.

Decent Idea... If you still want the regex, it'd be something like this:


commadelimiter = '"([^,]*?),([^"]*?)"';
while (REFind(mystring,commadelimiter)) {
mystring = REREplace(mystring,commadelimiter,'"\1-\2"','ALL');
}


hth


Isaac Dealey
Certified Advanced ColdFusion Developer

www.turnkey.to
954-776-0046
__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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

2002-04-17 Thread Michael Dinowitz

REReplace(string, '[^0-9]', '', 'all')
this says find anything that is not 0-9 and replace it with nothing.

At 04:26 PM 4/17/02, you wrote:
>Anybody got a regex that will remove anything except numbers from a
>string?
>
>Thanks,
>Matt Small
>
>
__
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

2002-04-17 Thread Matthew R. Small

Thanks, worked great for me.

- Matt Small

-Original Message-
From: Michael Dinowitz [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, April 17, 2002 4:25 PM
To: CF-Talk
Subject: Re: Regex

REReplace(string, '[^0-9]', '', 'all')
this says find anything that is not 0-9 and replace it with nothing.

At 04:26 PM 4/17/02, you wrote:
>Anybody got a regex that will remove anything except numbers from a
>string?
>
>Thanks,
>Matt Small
>
>

__
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



RE: Regex?

2001-07-10 Thread Garza, Jeff

I'd use a cfm template for this... I'm assuming you have CF running on the
server where the image files are at.

Do a CFDIRECTORY to get the files.

Loop over the file list and to a 
 followed by



This should effectively take care of your problem.

Jeff Garza
Lead Developer/Webmaster
Spectrum Astro, Inc.
480.892.8200
[EMAIL PROTECTED]
http://www.spectrumastro.com



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, July 10, 2001 4:54 PM
To: CF-Talk
Subject: SOT: Regex?


Hi all,

Sorry for this slightly off topic post - I have exceedingly stupid (and
cheap) clients and need to know if this is possible.

This client has created a huge site himself, incorporating gallery pages
with hundreds of images, both thumnails and high quality versions.
Considering everything, he hasn't done too bad a job - it looks fairly good.
Except the image files are named in a variety of ways - uppercase, lowercase
and mixed case - and the links to the images do not necessarily match up
with the image filenames with regard to case. This is going to be deployed
on a linux box, so that is obviously not going to work.

Rather than cross-check each filename with the links, I am going to use a
utility to rename all the image files with all lower case. That's no
problem. What I am not sure about how to do is this: I want to use extended
find and replace in Studio to convert everything to lower case that is
inside a tag. Is this even possible? Not being a regex guru, I'm hoping it
is, because manually editing links in about 500 files does not sound like my
idea of a fun Wednesday afternoon, and something I'm sure the client does
not want to pay for.

If anyone can help, I'd really appreciate it!

K.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Regex?

2001-07-10 Thread Mike Sullivan

If you have linux, use sed.  something like:
cat something.cfm|sed -e \
'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' | \
somethingelse.cfm

that will do a character by character transformation.
Mike

> -Original Message-
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, July 10, 2001 4:54 PM
> To:   CF-Talk
> Subject:  SOT: Regex?
> 
> Hi all,
> 
> Sorry for this slightly off topic post - I have exceedingly stupid (and
> cheap) clients and need to know if this is possible.
> 
> This client has created a huge site himself, incorporating gallery pages
> with hundreds of images, both thumnails and high quality versions.
> Considering everything, he hasn't done too bad a job - it looks fairly
> good. Except the image files are named in a variety of ways - uppercase,
> lowercase and mixed case - and the links to the images do not necessarily
> match up with the image filenames with regard to case. This is going to be
> deployed on a linux box, so that is obviously not going to work.
> 
> Rather than cross-check each filename with the links, I am going to use a
> utility to rename all the image files with all lower case. That's no
> problem. What I am not sure about how to do is this: I want to use
> extended find and replace in Studio to convert everything to lower case
> that is inside a tag. Is this even possible? Not being a regex guru, I'm
> hoping it is, because manually editing links in about 500 files does not
> sound like my idea of a fun Wednesday afternoon, and something I'm sure
> the client does not want to pay for.
> 
> If anyone can help, I'd really appreciate it!
> 
> K.
> 
> 
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: RegEx

2002-10-10 Thread Greg McDaniel

Sorry, getContainer is not a tag, it is a UDF that you can find on
cflib.org.

Greg
-Original Message-
From: Willy Ray [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 10:55 AM
To: CF-Talk
Subject: SOT: RegEx


Ok, I have a string that looks like this:

/web/path/to/myfile.jpg JPEG 1280x1024 DirectClass 8-bit 95kb 0.3u 0:01

It's an imagemagic identification of a file that my user is uploading.
myfile.jpg is CFFILE.clientfile.

I need to go through this thing and get the 1280x1024 out.  I could come up
with a way to do this w/o regular expressions, but it wouldn't be as
flexible as I'd like it to be.

I've tried this:




And this:



Doesn't seem to work.  Any ideas?





-
Willy Ray
Web Applications Developer
Certified Advanced ColdFusion Developer
Westminster College


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: RegEx

2002-10-10 Thread Ben Doom

: /web/path/to/myfile.jpg JPEG 1280x1024 DirectClass 8-bit 95kb 0.3u 0:01
:   
:
: And this:
:
:   

I'm assuming you're using CFMX, or the style you're trying to employ won't
work.

IIRC, in CFMX, you almost had it with the first refind, but you need to use
backslashes instead of forward slashes.  You could also do this:

size = rereplace(mystring, ".*(\d+x\d+).*", "\1")

If you are using CF5, you need to do something like

start = refind("[0-9]+x[0-9]+", mystring)
or
size = rereplace(mystring, ".*([0-9]+x[0-9]+).*", "\1")

HTH.

As always, a plug for the CF-RexEx list.  If you like to use them, are
interested about learning more about them, or just want to know what the
heck all this "regular expression" junk is, check out the archives, post, or
join at:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21



  --Ben Doom
Programmer & General Lackey
Moonbow Software

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: RegEx

2002-10-10 Thread Willy Ray

CF-RegEx list!  Woo-hoo!  I didn't even know there was such a thing!  I'm all over it. 

Thanks!





-
Willy Ray
Web Applications Developer
Certified Advanced ColdFusion Developer
Westminster College

>>> [EMAIL PROTECTED] 10/10/02 12:03PM >>>
: /web/path/to/myfile.jpg JPEG 1280x1024 DirectClass 8-bit 95kb 0.3u 0:01
:   
:
: And this:
:
:   

I'm assuming you're using CFMX, or the style you're trying to employ won't
work.

IIRC, in CFMX, you almost had it with the first refind, but you need to use
backslashes instead of forward slashes.  You could also do this:

size = rereplace(mystring, ".*(\d+x\d+).*", "\1")

If you are using CF5, you need to do something like

start = refind("[0-9]+x[0-9]+", mystring)
or
size = rereplace(mystring, ".*([0-9]+x[0-9]+).*", "\1")

HTH.

As always, a plug for the CF-RexEx list.  If you like to use them, are
interested about learning more about them, or just want to know what the
heck all this "regular expression" junk is, check out the archives, post, or
join at:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21 



  --Ben Doom
Programmer & General Lackey
Moonbow Software


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: RegEx

2002-10-10 Thread James Peek

I think the first solution without the regexp works a bit better, but
take your pick:







width: #width#, height: #height#






width: #width#, height: #height#

Only problem with both is there is no error checking for the case where
no width/height is set, and also the regexp would return the wrong
result if the filename had numbers in it.

Hth,

James




-Original Message-
From: Willy Ray [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, 10 October 2002 19:55
To: CF-Talk
Subject: SOT: RegEx


Ok, I have a string that looks like this:

/web/path/to/myfile.jpg JPEG 1280x1024 DirectClass 8-bit 95kb 0.3u 0:01

It's an imagemagic identification of a file that my user is uploading.
myfile.jpg is CFFILE.clientfile.

I need to go through this thing and get the 1280x1024 out.  I could come
up with a way to do this w/o regular expressions, but it wouldn't be as
flexible as I'd like it to be.

I've tried this:




And this:



Doesn't seem to work.  Any ideas?



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: RegEx

2003-03-01 Thread Ben Doom
findfirst = refind(content, "", 1,1);
Will return a pair of arrays (pos and len) which include the position and
length of the whole regex and the bit in parens.

So findfirst.pos[2] is the beginning of the first filename, and
findfirst.len[2] is the beginning of the second.

To find the next one, replace the first 1 (which is the character to start
looking from) with findfirst.pos[1]+findfirst.len[1]+1 which is the
character after the 

If that didn't make any sense at all, feel free to pester me with a billion
questions on the CF-RegEx list:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21
Where the CF Ninjas and Obayuns are happy to help with any RegEx question.


--  Ben Doom
Programmer & General Lackey
Moonbow Software, Inc

: -Original Message-
: From: Cedric Villat [mailto:[EMAIL PROTECTED]
: Sent: Saturday, March 01, 2003 12:22 PM
: To: CF-Talk
: Subject: RegEx
:
:
: I trying to do something, and I think RegEx is the perfect solution. The
: problem is I know nothing about RegEx.
:
: I'm reading a file into a variable and then I want to find ann the
: 's in the file and parse out the template of the
: cfinclude. If in
: the file there are 3 cfinclude's I want to return the 3 template names.
: Anyone have any idea how to go about finding and parsing out the
:  and getting what's in between? Thanks.
:
: Cedric
:
:
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Regex?

2003-05-30 Thread Ewok
hello? no ideas?

- Original Message -
From: "Ewok" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, May 29, 2003 1:30 AM
Subject: Regex?


> Hi,
>
>
> I've written a message board in CF The user's can add links to their
> posts and make them hot by surrounding the url in brackets
> [http://houseoffusion.com]
> in the output code i search their post and replace this with the
appropriate
> html using the regex below...
>
> \1',
'all')>
>
> recently someone broke the table structure with the longest link known to
> man... (seriously)
>
> so I've been pounding my head against the screen trying to come up with a
> regex to allow link text or to use a set number of characters from the
link
> AS the link text
>
> with link text.. maybe turn something like
> [House of Fusion|http://houseoffusion.com]
>  into
> http://houseoffusion.com";>House of Fusion
>
> or maybe
> [http://houseoffusion.com]
> into
> http://houseoffusion.com";>http://houseoffus...
>
> my heads getting a bruise and my screen is about to crack... help!
>
> (~) o
> _\
>  ~ /
>
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Regex?

2003-05-30 Thread Ben Doom
If you have a problem with the length of the string, you're going to have to
loop across it, as there's not way I know of to limit the length of the
output without limiting the length of the input.


--  Ben Doom
Programmer & General Lackey
Moonbow Software, Inc

: -Original Message-
: From: Ewok [mailto:[EMAIL PROTECTED]
: Sent: Thursday, May 29, 2003 8:52 PM
: To: CF-Talk
: Subject: Re: Regex?
:
:
: hello? no ideas?
:
: - Original Message -
: From: "Ewok" <[EMAIL PROTECTED]>
: To: "CF-Talk" <[EMAIL PROTECTED]>
: Sent: Thursday, May 29, 2003 1:30 AM
: Subject: Regex?
:
:
: > Hi,
: >
: >
: > I've written a message board in CF The user's can add links to their
: > posts and make them hot by surrounding the url in brackets
: > [http://houseoffusion.com]
: > in the output code i search their post and replace this with the
: appropriate
: > html using the regex below...
: >
: > \1',
: 'all')>
: >
: > recently someone broke the table structure with the longest
: link known to
: > man... (seriously)
: >
: > so I've been pounding my head against the screen trying to come
: up with a
: > regex to allow link text or to use a set number of characters from the
: link
: > AS the link text
: >
: > with link text.. maybe turn something like
: > [House of Fusion|http://houseoffusion.com]
: >  into
: > http://houseoffusion.com";>House of Fusion
: >
: > or maybe
: > [http://houseoffusion.com]
: > into
: > http://houseoffusion.com";>http://houseoffus...
: >
: > my heads getting a bruise and my screen is about to crack... help!
: >
: > (~) o
: > _\
: >  ~ /
: >
: >
: >
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Regex

2003-06-09 Thread Mike Townend
How about something like



HTH



-Original Message-
From: Ryan Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 9, 2003 10:36
To: CF-Talk
Subject: Regex


Yet another regex... Is there a tutorial anywhere on them so I can learn to
do them myself?

Right, basically I'm using the CGI.SCRIPT_NAME variable to determine the
directory that a file is in, and do some database selecting as
appropriate...

So, I need to strip the CGI.SCRIPT_NAME variable to just give me the first
directory... 

Ie /blah/index.cfm >> blah

TIA
Ryan


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Regex

2003-06-09 Thread Mike Townend
The only initial trouble with this is that if the file is in the root of the
site this function will return the "wwwroot" or whatever your root folder is
called... And I just noticed the delimiter should be "\"



HTH



-Original Message-
From: Mike Townend [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 9, 2003 10:44
To: CF-Talk
Subject: RE: Regex


How about something like



HTH



-Original Message-
From: Ryan Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 9, 2003 10:36
To: CF-Talk
Subject: Regex


Yet another regex... Is there a tutorial anywhere on them so I can learn to
do them myself?

Right, basically I'm using the CGI.SCRIPT_NAME variable to determine the
directory that a file is in, and do some database selecting as
appropriate...

So, I need to strip the CGI.SCRIPT_NAME variable to just give me the first
directory... 

Ie /blah/index.cfm >> blah

TIA
Ryan



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Regex

2003-06-09 Thread Ryan Mitchell
It won't be in the wwwroot, so that¹s great. Thanks.
Ryan

On 9/6/03 10:48, "Mike Townend" <[EMAIL PROTECTED]> wrote:

> The only initial trouble with this is that if the file is in the root of the
> site this function will return the "wwwroot" or whatever your root folder is
> called... And I just noticed the delimiter should be "\"
> 
> 
> 
> HTH
> 
> 
> 
> -Original Message-
> From: Mike Townend [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 9, 2003 10:44
> To: CF-Talk
> Subject: RE: Regex
> 
> 
> How about something like
> 
> 
> 
> HTH
> 
> 
> 
> -Original Message-
> From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 9, 2003 10:36
> To: CF-Talk
> Subject: Regex
> 
> 
> Yet another regex... Is there a tutorial anywhere on them so I can learn to
> do them myself?
> 
> Right, basically I'm using the CGI.SCRIPT_NAME variable to determine the
> directory that a file is in, and do some database selecting as
> appropriate...
> 
> So, I need to strip the CGI.SCRIPT_NAME variable to just give me the first
> directory... 
> 
> Ie /blah/index.cfm >> blah
> 
> TIA
> Ryan
> 
> 
> 
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Regex

2003-06-09 Thread Ben Doom
I saw that you got an answer to this, and it's basically the same one I
would have given, so I won't talk about script names.

I will say that there are a number of places to learn about regex.

If you are running CFMX, or if you want to learn about regex in general, and
not necessarily CF regex specifically, then I'd reccommend Mastering Regular
Expressions 2ed from O'Reilly.  Pretty good book, and the best I've seen
about RE.

If you are running CF5 (or IIRC CF 4.5) you should check out Micheal
Dinowitz's tutorial on House of Fusion.  It's pretty decent as a beginner's
guide as I recall.

Either way, if you want to learn about them, I highly reccommend the HoF
RegEx list:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21
where several of us (by which I mean really sharp regex people) are happy to
discuss how to do something and why that works.  They've even helped me
debug a new, more accurate email validation regex (check the archives,
folks!), so they are pretty useful guys.  :-)

HTH.


--  Ben Doom
Programmer & General Lackey
Moonbow Software, Inc

: -Original Message-
: From: Ryan Mitchell [mailto:[EMAIL PROTECTED]
: Sent: Monday, June 09, 2003 5:36 AM
: To: CF-Talk
: Subject: Regex
:
:
: Yet another regex... Is there a tutorial anywhere on them so I
: can learn to
: do them myself?
:
: Right, basically I'm using the CGI.SCRIPT_NAME variable to determine the
: directory that a file is in, and do some database selecting as
: appropriate...
:
: So, I need to strip the CGI.SCRIPT_NAME variable to just give me the first
: directory...
:
: Ie /blah/index.cfm >> blah
:
: TIA
: Ryan
:
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: REGEX

2003-07-27 Thread Dave Carabetta
> Hi all,
>
> I'm looking for a solution to strip the alpha from a string.
>
> The string is something like PTK191919. I need to get the part after the
> letters. Note the number of letters is not constant.
>
> I'll keep trying, but if you've done this type of thing before please let
me
> know.
>

This should do it:

REReplace(string, "[A-Z]", "", "ALL")

Here's a test case:





#string#
#newString#


Regards,
Dave.
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

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

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: REGEX

2003-07-27 Thread Frank Mamone
Thanks Dave.

Works!

I was trying to use REFIND.

This is much easier.

-Frank



- Original Message -
From: "Dave Carabetta" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, July 27, 2003 6:57 PM
Subject: Re: REGEX


> > Hi all,
> >
> > I'm looking for a solution to strip the alpha from a string.
> >
> > The string is something like PTK191919. I need to get the part after the
> > letters. Note the number of letters is not constant.
> >
> > I'll keep trying, but if you've done this type of thing before please
let
> me
> > know.
> >
>
> This should do it:
>
> REReplace(string, "[A-Z]", "", "ALL")
>
> Here's a test case:
>
> 
> 
>
> 
> #string#
> #newString#
> 
>
> Regards,
> Dave.
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: regex ?

2004-02-23 Thread Tom Smith
#mid(string, 3, len(string))#

where string is your variable..

does this do what you want?
- Original Message - 
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 1:01 PM
Subject: regex ?

> i need a regex that will strip the first 2 charachters from the value
> ex: the # will be 2004 but i just need the 04 part
>
> ty :)
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread Tom Smith
or you could just use #right(srting, 2)#

- Original Message - 
From: "Tom Smith" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 1:04 PM
Subject: Re: regex ?

> #mid(string, 3, len(string))#
>
> where string is your variable..
>
> does this do what you want?
> - Original Message - 
> From: <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, February 23, 2004 1:01 PM
> Subject: regex ?
>
>
> > i need a regex that will strip the first 2 charachters from the value
> > ex: the # will be 2004 but i just need the 04 part
> >
> > ty :)
> >
> >
> >
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: regex ?

2004-02-23 Thread Pascal Peters
RemoveChars(str,1,2) 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: maandag 23 februari 2004 14:02
> To: CF-Talk
> Subject: regex ?
> 
> i need a regex that will strip the first 2 charachters from the value
> ex: the # will be 2004 but i just need the 04 part
> 
> ty :)
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: regex ?

2004-02-23 Thread cf
ty, worked great

however i didnt really get the results i wanted

ok heres what i need

i get a number that needs to go into the db, the number will be like this
23 2 2004
or like this
1 2 2004

i need it to go into the db as each one being a 2 digit
like
23 02 04
or
01 02 04

now i can do it with a bunch of cfswitchs but is there a better way?

ty :)




> RemoveChars(str,1,2)
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: maandag 23 februari 2004 14:02
>> To: CF-Talk
>> Subject: regex ?
>>
>> i need a regex that will strip the first 2 charachters from the value
>> ex: the # will be 2004 but i just need the 04 part
>>
>> ty :)
>>
>>
>>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread Tom Smith
are they dates?  or is that just the way my English brain is reading them?
- Original Message - 
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 2:49 PM
Subject: RE: regex ?

> ty, worked great
>
> however i didnt really get the results i wanted
>
> ok heres what i need
>
> i get a number that needs to go into the db, the number will be like this
> 23 2 2004
> or like this
> 1 2 2004
>
> i need it to go into the db as each one being a 2 digit
> like
> 23 02 04
> or
> 01 02 04
>
> now i can do it with a bunch of cfswitchs but is there a better way?
>
> ty :)
>
>
>
>
>
>
>
>
> > RemoveChars(str,1,2)
> >
> >> -Original Message-
> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >> Sent: maandag 23 februari 2004 14:02
> >> To: CF-Talk
> >> Subject: regex ?
> >>
> >> i need a regex that will strip the first 2 charachters from the value
> >> ex: the # will be 2004 but i just need the 04 part
> >>
> >> ty :)
> >>
> >>
> >>
> >
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread cf
yes they are dates
and i have tried dateformat and it worked great for feb but when i added
one for march it switched the day and month around
and i cant change the #'s (date) coming in from the source


> are they dates?  or is that just the way my English brain is reading
> them? - Original Message -
> From: <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Monday, February 23, 2004 2:49 PM
> Subject: RE: regex ?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread Tim Lucas
Are you wanting to do it in one line? I think you'd need to do multiple 
regexs anyway.

You could just use the list functions (code untested):


  
  


  
  


  
  
 
 
"))," ">
  
 
 
"))," ">
  


Best to wrap this in a custom tag or UDF.

Alternatively you could use CF's datetime functions or multiple regexs.

HTH

-- tim

www.toolmantim.com
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread Tom Smith
you know you could use create date if they are all in that format...

#createDate(listLast(string, " "), listGetAt(string, 2, " "),
listFirst(string, " "))#

this might work...  then you can get what you want out of it using
dateFormat or whatever.

HTH

Tom

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 2:58 PM
Subject: Re: regex ?

> yes they are dates
> and i have tried dateformat and it worked great for feb but when i added
> one for march it switched the day and month around
> and i cant change the #'s (date) coming in from the source
>
>
>
>
> > are they dates?  or is that just the way my English brain is reading
> > them? - Original Message -
> > From: <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, February 23, 2004 2:49 PM
> > Subject: RE: regex ?
>
>
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread Charlie Griefer
right(listLast(myDateString, ' '), 2)

- Original Message - 
From: <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, February 23, 2004 7:49 AM
Subject: RE: regex ?

> ty, worked great
>
> however i didnt really get the results i wanted
>
> ok heres what i need
>
> i get a number that needs to go into the db, the number will be like this
> 23 2 2004
> or like this
> 1 2 2004
>
> i need it to go into the db as each one being a 2 digit
> like
> 23 02 04
> or
> 01 02 04
>
> now i can do it with a bunch of cfswitchs but is there a better way?
>
> ty :)
>
>
>
>
>
>
>
>
> > RemoveChars(str,1,2)
> >
> >> -Original Message-
> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >> Sent: maandag 23 februari 2004 14:02
> >> To: CF-Talk
> >> Subject: regex ?
> >>
> >> i need a regex that will strip the first 2 charachters from the value
> >> ex: the # will be 2004 but i just need the 04 part
> >>
> >> ty :)
> >>
> >>
> >>
> >
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread cf
ty! i will give it a shot


> you know you could use create date if they are all in that format...
>
> #createDate(listLast(string, " "), listGetAt(string, 2, " "),
> listFirst(string, " "))#
>
> this might work...  then you can get what you want out of it using
> dateFormat or whatever.
>
> HTH
>
> Tom
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-23 Thread cf
ty!
i dont need or expect to do it in 1 line but doing 40 switches is the very
long way im sure


> Are you wanting to do it in one line? I think you'd need to do multiple
> regexs anyway.
>
> You could just use the list functions (code untested):
>
> 
>   
>   
> ">
> 
> 
>   
>   
> ">
> 
> 
>   
>   
>  
>  
> "))," ">
>   
>  
>  
> "))," ">
>   
> 
>
> Best to wrap this in a custom tag or UDF.
>
> Alternatively you could use CF's datetime functions or multiple regexs.
>
> HTH
>
> -- tim
>
> www.toolmantim.com
>
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: regex ?

2004-02-23 Thread Pascal Peters
If they are dates that come in a d m  format, you could do something
like

DateFormat(CreateDate(ListGetAt(str,3," "),ListGetAt(str,2,"
"),ListGetAt(str,1," ")),"dd mm yy") 

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: maandag 23 februari 2004 15:50
> To: CF-Talk
> Subject: RE: regex ?
> 
> ty, worked great
> 
> however i didnt really get the results i wanted
> 
> ok heres what i need
> 
> i get a number that needs to go into the db, the number will 
> be like this
> 23 2 2004
> or like this
> 1 2 2004
> 
> i need it to go into the db as each one being a 2 digit like
> 23 02 04
> or
> 01 02 04
> 
> now i can do it with a bunch of cfswitchs but is there a better way?
> 
> ty :)
> 
> 
> 
> 
> 
> 
> 
> 
> > RemoveChars(str,1,2)
> >
> >> -Original Message-
> >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> >> Sent: maandag 23 februari 2004 14:02
> >> To: CF-Talk
> >> Subject: regex ?
> >>
> >> i need a regex that will strip the first 2 charachters 
> from the value
> >> ex: the # will be 2004 but i just need the 04 part
> >>
> >> ty :)
> >>
> >>
> >>
> > 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: regex ?

2004-02-24 Thread cf
ty it worked great!

> you know you could use create date if they are all in that format...
>
> #createDate(listLast(string, " "), listGetAt(string, 2, " "),
> listFirst(string, " "))#
>
> this might work...  then you can get what you want out of it using
> dateFormat or whatever.
>
> HTH
>
> Tom
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Regex

2003-12-01 Thread Massimo Foti
> I was just reading Ben's Blog this morning and seen his regex's for postal
> and zip codes.  Now I've used regex's in perl but how do you actually use
> them in CF?  Code examples anyone?

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/regexp.htm#wp1100400


Massimo Foti
Certified Dreamweaver MX Developer
Certified Advanced ColdFusion MX Developer
http://www.massimocorner.com/

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Regex

2003-12-01 Thread Ben Forta
CFML functions:
 REFind()
 REFindNoCase()
 REReplace()
 REReplaceNoCase()

 
And you can also pass _javascript_ regular expressions to .

 
--- Ben

-Original Message-
From: Trevor Holm-Laursen [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 01, 2003 7:12 AM
To: CF-Talk
Subject: Regex

I was just reading Ben's Blog this morning and seen his regex's for
postal and zip codes.  Now I've used regex's in perl but how do you
actually use them in CF?  Code examples anyone? 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Regex

2003-12-01 Thread Ubqtous
Trevor,

On 12/1/2003 at 07:11, you wrote:

THL> I was just reading Ben's Blog this morning and seen his regex's
THL> for postal and zip codes.  Now I've used regex's in perl but how
THL> do you actually use them in CF? Code examples anyone?

I use the following (snippet from a UDF):

// Validate zip code ("12345" or "12345-6789")
if(not (refindnocase("^[0-9]{5}$|^[0-9]{5}\-[0-9]{4}$",string))){isvalid=false;}

~ Ubqtous ~
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Regex

2003-12-01 Thread Larry Juncker
This is how you could use this in CF...






Validate zip code #zipStr#

	

	


	#isValidUSZip#




-Original Message-
From: Ubqtous [mailto:[EMAIL PROTECTED]
Sent: Monday, December 01, 2003 8:14 AM
To: CF-Talk
Subject: Re: Regex

Trevor,

On 12/1/2003 at 07:11, you wrote:

THL> I was just reading Ben's Blog this morning and seen his regex's
THL> for postal and zip codes.  Now I've used regex's in perl but how
THL> do you actually use them in CF? Code examples anyone?

I use the following (snippet from a UDF):

// Validate zip code ("12345" or "12345-6789")
if(not
(refindnocase("^[0-9]{5}$|^[0-9]{5}\-[0-9]{4}$",string))){isvalid=false;}

~ Ubqtous ~
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Regex

2003-12-01 Thread Michael Dinowitz
http://www.houseoffusion.com/RegEx.ppt
This is an old presentation on RegEx that should help out (along with the other
links provided). In addition, there is a mailing list on House of Fusion
dedicated to RegEx if that's of specific interest to you (it is to me).
http://www.houseoffusion.com/cf_lists/threads.cfm/21

--
Michael Dinowitz
Finding technical solutions to the problems you didn't know you had yet
- Original Message - 
From: "Trevor Holm-Laursen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Monday, December 01, 2003 7:11 AM
Subject: Regex

> I was just reading Ben's Blog this morning and seen his regex's for postal and
zip codes.  Now I've used regex's in perl but how do you actually use them in
CF?  Code examples anyone?
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Regex

2007-04-24 Thread Ben Nadel
REReplace( your_text, ",?\s*\d+$", "", "ONE" ) 

,? = optional comma
\s* = zero or more spaces
\d+ = one or more digit
$ = end of string


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 4:27 PM
To: CF-Talk
Subject: OT: Regex

Quick regex question

 

I have a string

 

NewYork, NewYork, 10005

 

I know that in an REReplace, \d will get rid of the zip code at the end,
that leaves a trailing comma. How do I dump the trailing comma also?

 

Thanks

 

sas

 

-- 

Scott Stewart

ColdFusion Developer

 

SSTWebworks

7241 Jillspring Ct.

Springfield, Va. 22152

(703) 220-2835

 

http://www.sstwebworks.com

 





~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276164
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: Regex

2007-04-24 Thread Scott Stewart
Thanks Ben...

-- 
Scott Stewart
ColdFusion Developer
 
SSTWebworks
7241 Jillspring Ct.
Springfield, Va. 22152
(703) 220-2835
 
http://www.sstwebworks.com

-Original Message-
From: Ben Nadel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 4:31 PM
To: CF-Talk
Subject: RE: Regex

REReplace( your_text, ",?\s*\d+$", "", "ONE" ) 

,? = optional comma
\s* = zero or more spaces
\d+ = one or more digit
$ = end of string


...
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Scott Stewart [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 24, 2007 4:27 PM
To: CF-Talk
Subject: OT: Regex

Quick regex question

 

I have a string

 

NewYork, NewYork, 10005

 

I know that in an REReplace, \d will get rid of the zip code at the end,
that leaves a trailing comma. How do I dump the trailing comma also?

 

Thanks

 

sas

 

-- 

Scott Stewart

ColdFusion Developer

 

SSTWebworks

7241 Jillspring Ct.

Springfield, Va. 22152

(703) 220-2835

 

http://www.sstwebworks.com

 







~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion?sdid=RVJW

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276166
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: RegEx

2006-05-09 Thread Jerry Johnson
I'll give it a crack, until someone smarter corrects us both...

  rereplacenocase(filtered, 'a href="([^"]+)"', 'a
href="scrubber.cfm?\1"', "all")


On 5/9/06, Paul <[EMAIL PROTECTED]> wrote:
> This should be easier than the past few hours would have me believe.
>
>
>
> I'd like to display outdated pages of our intranet through a filter of sorts
> by reassigning any links in the old content.  So if the old page has a link
> to "http://portal/employee_profiles.cfm"; I want that link to become
> "http://portal2/scrubber.cfm?scrub=http://portal/employee_profiles.cfm";.
> The scrubber template reads the referenced file w/ cfhttp, find/replaces a
> few things, and then outputs the filtered content.  (This needs to be done
> dynamically to allow some people to see the old files and some people to see
> the new version of the old files, so I can't fix it in the actual files
> themselves.)
>
>
>
> I've managed to use reReplaceNoCase well enough to remove the links
> entirely:
>
> rereplacenocase(filtered, 'a href="[^"]+"', 'a href=""', "all")
>
>
>
> But I need to replace it with a link to the scrubber containing the original
> href in the url as well.  Does this make sense?  I can't believe how my
> brain hates regular expressions.
>
>
>
> Paul
>
>
>
> 

~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239988
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: RegEx

2006-05-09 Thread Munson, Jacob
That looks good to me, but he probably wants to add the full URL in,
plus you left off the 'scrub=' part:
rereplacenocase(filtered, 'a href="([^"]+)"', 'a
href="http://portal2/scrubber.cfm?scrub=\1";', "all")

> -Original Message-
> From: Jerry Johnson [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 09, 2006 12:53 PM
> 
> I'll give it a crack, until someone smarter corrects us both...
> 
>   rereplacenocase(filtered, 'a href="([^"]+)"', 'a
> href="scrubber.cfm?\1"', "all")

This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. A1.



~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:239994
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: regex

2005-07-29 Thread Russ Michaels
While that tag looks very handy, it doesn't write the REGEX for you, you
still have to supply the REGEX to the tag for it to find the text your
looking for.


Russ

-Original Message-
From: Claude Schneegans [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2005 17:22
To: CF-Talk
Subject: Re: FW: [CF-Dev] regex

 >>I need to extract data from WHOIS output.

Have a look a CF_REExtract:
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf

It has especially developed for this king of job.

--
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED]) Thanks.




~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213284
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: regex

2005-07-29 Thread Spike
You don't need to use a regex to get that info out of the whois output.













#expiryDate#


Spike

On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> 
> While that tag looks very handy, it doesn't write the REGEX for you, you
> still have to supply the REGEX to the tag for it to find the text your
> looking for.
> 
> 
> Russ
> 
> -Original Message-
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: 29 July 2005 17:22
> To: CF-Talk
> Subject: Re: FW: [CF-Dev] regex
> 
> >>I need to extract data from WHOIS output.
> 
> Have a look a CF_REExtract:
> 
> http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf
> 
> It has especially developed for this king of job.
> 
> --
> ___
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.
> 
> 
> 
> 
> 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213285
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: regex

2005-07-29 Thread Claude Schneegans
 >>it doesn't write the REGEX for you

Such a tag is still to be invented ;-)

However, the main idea in CF_REExtract is that most of the time it is 
MUCH easier
to describe in a REGEX what's before and what's after the string you 
want to extract,
than to describe the string itself.
Sometimes, you don't even need REGEX, ordinary strings are enough.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213291
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: regex

2005-07-29 Thread Russ Michaels
I did try something along those lines originally, but CF doesn't seem to be
able to pickup the chr(10) or chr(13)
 

Russ

-Original Message-
From: Spike [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2005 18:03
To: CF-Talk
Subject: Re: regex

You don't need to use a regex to get that info out of the whois output.

 
  
  


  #expiryDate# 

Spike

On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> 
> While that tag looks very handy, it doesn't write the REGEX for you, 
> you still have to supply the REGEX to the tag for it to find the text 
> your looking for.
> 
> 
> Russ
> 
> -Original Message-
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: 29 July 2005 17:22
> To: CF-Talk
> Subject: Re: FW: [CF-Dev] regex
> 
> >>I need to extract data from WHOIS output.
> 
> Have a look a CF_REExtract:
> 
> http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
> m?p=hf
> 
> It has especially developed for this king of job.
> 
> --
> ___
> REUSE CODE! Use custom tags;
> See http://www.contentbox.com/claude/customtags/tagstore.cfm
> (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.
> 
> 
> 
> 
> 



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213292
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: regex

2005-07-29 Thread Caroline Wise
Russ,

If I understand correctly, this might be of help:







#Mid(teststring,REFind(regex,teststring,start),11)#




The regular expression is based on that you have a dd-mmm-
pattern. Then you loop over your file content until it runs out of
"hits".

Best of luck,
Caroline Wise




On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> I did try something along those lines originally, but CF doesn't seem to be
> able to pickup the chr(10) or chr(13)
> 
> 
> Russ
> 
> -Original Message-
> From: Spike [mailto:[EMAIL PROTECTED]
> Sent: 29 July 2005 18:03
> To: CF-Talk
> Subject: Re: regex
> 
> You don't need to use a regex to get that info out of the whois output.
> 
>  
>   findNoCase("Expiration Date",aLines[i])> 
>   
> 
> 
>   parseDateTime(dateString) /> #expiryDate# 
> 
> Spike
> 
> On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> >
> > While that tag looks very handy, it doesn't write the REGEX for you,
> > you still have to supply the REGEX to the tag for it to find the text
> > your looking for.
> >
> >
> > Russ
> >
> > -Original Message-
> > From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> > Sent: 29 July 2005 17:22
> > To: CF-Talk
> > Subject: Re: FW: [CF-Dev] regex
> >
> > >>I need to extract data from WHOIS output.
> >
> > Have a look a CF_REExtract:
> >
> > http://www.contentbox.com/claude/customtags/REextract/testREextract.cf
> > m?p=hf
> >
> > It has especially developed for this king of job.
> >
> > --
> > ___
> > REUSE CODE! Use custom tags;
> > See http://www.contentbox.com/claude/customtags/tagstore.cfm
> > (Please send any spam to this address: [EMAIL PROTECTED]) Thanks.
> >
> >
> >
> >
> >
> 
> 
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213296
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: regex

2005-07-29 Thread Russ Michaels
Problem with that approach Is that each WHOIS output is different for each
TLD, and there are multiple dates on the page, and the expiry date or
whatever I want to extract will be in a different format.

I gave Spikes code a try for the HELL of it and strangely that did parse all
the chr(10) chars, so it must just be the Find() function that fails on
that, learn something new every day.
Anyway I have resorted back to good old fashioned string manipulation
functions after using listtoarray() to extract all the lines as per Spikes
example and it all works fine now.
I now have a handy dandy component for doing whois lookups and extracting
specific info from them.

In case your wondering why I would want to do this, it is to update our
domains database with the current expiry dates and contact info for each
domain.
 

Russ Michaels   

-Original Message-
From: Caroline Wise [mailto:[EMAIL PROTECTED] 
Sent: 29 July 2005 19:47
To: CF-Talk
Subject: Re: regex

Russ,

If I understand correctly, this might be of help:





 
#Mid(teststring,REFind(regex,teststring,start),11)#

 

The regular expression is based on that you have a dd-mmm- pattern. Then
you loop over your file content until it runs out of "hits".

Best of luck,
Caroline Wise




On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> I did try something along those lines originally, but CF doesn't seem 
> to be able to pickup the chr(10) or chr(13)
> 
> 
> Russ
> 
> -Original Message-
> From: Spike [mailto:[EMAIL PROTECTED]
> Sent: 29 July 2005 18:03
> To: CF-Talk
> Subject: Re: regex
> 
> You don't need to use a regex to get that info out of the whois output.
> 
>   "" />   findNoCase("Expiration Date",aLines[i])>  />   
> 
> 
>   parseDateTime(dateString) /> #expiryDate# 
> 
> Spike
> 
> On 7/29/05, Russ Michaels <[EMAIL PROTECTED]> wrote:
> >
> > While that tag looks very handy, it doesn't write the REGEX for you, 
> > you still have to supply the REGEX to the tag for it to find the 
> > text your looking for.
> >
> >
> > Russ
> >
> > -Original Message-
> > From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> > Sent: 29 July 2005 17:22
> > To: CF-Talk
> > Subject: Re: FW: [CF-Dev] regex
> >
> > >>I need to extract data from WHOIS output.
> >
> > Have a look a CF_REExtract:
> >
> > http://www.contentbox.com/claude/customtags/REextract/testREextract.
> > cf
> > m?p=hf
> >
> > It has especially developed for this king of job.
> >
> > --
> > ___
> > REUSE CODE! Use custom tags;
> > See http://www.contentbox.com/claude/customtags/tagstore.cfm
> > (Please send any spam to this address: [EMAIL PROTECTED])
Thanks.
> >
> >
> >
> >
> >
> 
> 
> 
> 



~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:213300
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: Regex

2007-03-27 Thread Ken Wexel
Do you have to use Regex, or can you do it via list/string functions?

On 3/27/07, Richard Cooper <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm really not very good with regex, but I need to extract a list of member 
> numbers. The numbers are contained in a list like this:
>
> John Smith (mid: 1000), Peter Pan (mid: 87), Harry Harrison (mid: 173),
>
> How would I go about doing this?
>
>
> 

~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273842
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Regex

2007-03-27 Thread Ben Nadel
You might consider just stripping out everything that is not a number
(but that might cause problems):

#REReplace( YOUR_LIST, "[^\d]+", ",", "ALL" )#

Where YOUR_LIST ist he string that has all that member output.

This would give you:

,1000,87,173,

Notice that there is a leading and trailing empty list item. ColdFusion
will ignore these when you try to do future list manipulation stuff.


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: Richard Cooper [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 27, 2007 10:20 AM
To: CF-Talk
Subject: Regex

Hi all,

I'm really not very good with regex, but I need to extract a list of
member numbers. The numbers are contained in a list like this:

John Smith (mid: 1000), Peter Pan (mid: 87), Harry Harrison (mid: 173),

How would I go about doing this?




~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273843
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Regex

2007-03-27 Thread Tero Pikala
Something like this? 



#plainLst#



-Original Message-
From: Richard Cooper [mailto:[EMAIL PROTECTED] 
Sent: 27 March 2007 15:20
To: CF-Talk
Subject: Regex

Hi all,

I'm really not very good with regex, but I need to extract a list of member
numbers. The numbers are contained in a list like this:

John Smith (mid: 1000), Peter Pan (mid: 87), Harry Harrison (mid: 173),

How would I go about doing this?




~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273844
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Regex

2007-03-27 Thread Raymond Camden
Your regex should be \d+, which means one or more digits. There is no
simple 'get all matches' in CF, but you can use reFindAll from CFLIB:

http://www.cflib.org/udf.cfm/refindall

This is how I did it:




On 3/27/07, Richard Cooper <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm really not very good with regex, but I need to extract a list of member 
> numbers. The numbers are contained in a list like this:
>
> John Smith (mid: 1000), Peter Pan (mid: 87), Harry Harrison (mid: 173),
>
> How would I go about doing this?
>
>
> 

~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273845
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Regex

2007-03-27 Thread Rob Wilkerson
If you just want to extract a list of the numbers, you can just clear all of
the non-numeric characters:



The regex was tested, not the CF syntax.  :-)

On 3/27/07, Richard Cooper <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm really not very good with regex, but I need to extract a list of
> member numbers. The numbers are contained in a list like this:
>
> John Smith (mid: 1000), Peter Pan (mid: 87), Harry Harrison (mid: 173),
>
> How would I go about doing this?
>
>
> 

~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273848
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Regex

2007-03-27 Thread Richard Cooper
Wow, some really quick and useful help from you all.  Thanks this has shown me 
a few different approaches.
Regards,

Richard

~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273861
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Regex

2007-03-27 Thread [EMAIL PROTECTED]
Oh the lengths I'll go to in order to avoid writing a regex.






#mid(Trim(listlast(i, ":")),1,numlen)#



~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273862
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Regex

2007-03-27 Thread Claude Schneegans
 >>How would I go about doing this?

Hi,
This is really a job for CF_REextract.
See http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm
Then try it with your sample on line:
http://www.contentbox.com/claude/customtags/REextract/testingREextract.cfm
- Enter  [^(]*\(mid:[[:space:]]  in field RE1
- enter  \),? in RE2
- enter your sample John Smith (mid: 1000), Peter Pan (mid: 87), Harry 
Harrison (mid: 173),
in the sample text area,
- click the Test button,... et voilà!

You get a query with the names in column string1 and your numbers in 
string2.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.



~|
Create Web Applications With ColdFusion MX7 & Flex 2. 
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJS 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273856
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Regex

2007-03-27 Thread Rob Wilkerson
Maybe, but I'm telling you...once you make the leap and "get it" you'll
never go back.  I think regex might be the single greatest development tool
ever devised.  :-)

On 3/27/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Oh the lengths I'll go to in order to avoid writing a regex.
>
> 
>
> 
> 
> 
> #mid(Trim(listlast(i, ":")),1,numlen)#
> 
> 
>
> 

~|
Deploy Web Applications Quickly across the enterprise with ColdFusion MX7 & 
Flex 2
Free Trial 
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273868
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Regex

2007-03-27 Thread Jerry Johnson
Include files #1. Make is #2. Then regex.

Of course, I spent about 3 years, 25+ hours a week, using yacc and
regex to mimick all of the possible buttons and actions on sonar suite
simulators, so I have a passing familiarity with regex.

On 3/27/07, Rob Wilkerson <[EMAIL PROTECTED]> wrote:
> Maybe, but I'm telling you...once you make the leap and "get it" you'll
> never go back.  I think regex might be the single greatest development tool
> ever devised.  :-)

~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273873
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: regex

2010-01-25 Thread Andy Matthews

/\w+/ should work

\w matches all "word" characters including letters (upper and lower),
numbers, and some punctuation.

Here's a really good beginners guide to regex that I wrote.
http://andymatthews.net/read/2009/10/22/A-beginner's-guide-to-regular-expres
sions 


andy




-Original Message-
From: Mik Muller [mailto:ad...@montaguema.net] 
Sent: Monday, January 25, 2010 9:01 AM
To: cf-talk
Subject: regex


Can anyone give me a hand with this regex?  I know it's very simple. Just
don't have time to dig into it.

I need something that will take only...

/sometext/
/some-other-text/

...and ignore the following...

/sometext.ext?yadda=yadda&etc
/images/filename.jpg

In other words, the rule only runs if it appears to be a single folder name,
and nothing else.

Thanks,

Mik





Michael Muller
Admin, MontagueMA.net Website
...a project of MontagueWebWorks.com
mobile (413) 320-5336
http://www.MontagueMA.net

Eschew Obfuscation







~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330101
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: regex

2010-01-25 Thread Peter Boughton

The only punctuation that \w matches is underscore.

To match hyphen also, use [\w-], which then gives the expression "/[\w-]+/"

(To match hyphen but not underscore [a-zA-Z0-9-] is what you want)

NOTE: The hyphen must be first/last in the class, or be escaped with a 
backslash.

To specifically ignore "/images/filename.jpg" you need to ensure the second 
slash is at the end of the string, (and the opening slash at the start), so use:

"^/[\w-]+/$" 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330116
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: regex

2010-01-25 Thread Mik Muller

Thanks. 

I'm using it in ISAPI-ReWrite to rewrite URLs. Although it works in the 
built-in regex tester (which is handy) it's not working on the server:

RewriteRule (^/[\w-]+/$) index.cfm\?name=$1 [NC,L]

Could be something else I think.  I'm working with the support guy.

Mik


At 01:29 PM 1/25/2010, you wrote:

>The only punctuation that \w matches is underscore.
>
>To match hyphen also, use [\w-], which then gives the expression "/[\w-]+/"
>
>(To match hyphen but not underscore [a-zA-Z0-9-] is what you want)
>
>NOTE: The hyphen must be first/last in the class, or be escaped with a 
>backslash.
>
>To specifically ignore "/images/filename.jpg" you need to ensure the second 
>slash is at the end of the string, (and the opening slash at the start), so 
>use:
>
>"^/[\w-]+/$" 
>
>

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330131
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: regex

2010-01-26 Thread Peter Boughton

That'll probably be matching against the full hostname, so try this:

RewriteRule /[\w-]+/$ index.cfm\?name=$1 [NC,L]


Also might be necessary to escape the slashes, so if that doesn't work give 
this a try:

RewriteRule \/[\w-]+\/$ index.cfm\?name=$1 [NC,L]

(Another thing you could try is using \z instead of the $, i.e. /[\w-]+/\z but 
I doubt that's the problem.)

Oh, and I'm not sure if you need to escape the question mark in the second 
part? Try just index.cfm?name=$1 for that. 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:330133
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: RegEx help

2010-06-07 Thread Andy Matthews

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.


andy


-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help


I need to extract a particular piece of data from one of my query fields and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334347
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-07 Thread Jason Fisher

Assuming that those are tabs between the elements, the following will 
expand on Andy's suggestion.



#mid(testString, test.pos[2], test.len[2])#



From: "Andy Matthews" 
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk" 
Subject: RE: RegEx help

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.

andy

-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help

I need to extract a particular piece of data from one of my query fields 
and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need 
to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The 
Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know 
how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334351
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-08 Thread Debbie Morris

Thanks for the help, Jason and Andy. Turns out the character apparently isn't a 
tab though. Viewing it in WireShark, it looks like there is a carriage return 
(0d), a line feed (0a) and a space (20) between the age and gender strings.

Sorry to be so dumb, but I've managed to avoid regular expressions for the most 
part, so I'm really clueless now that I need it. I've tried reading through the 
documentation but it all seems like Greek to me. How can I test for the 
combination of those three characters?

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Monday, June 07, 2010 4:27 PM
To: cf-talk
Subject: RE: RegEx help


Assuming that those are tabs between the elements, the following will 
expand on Andy's suggestion.



#mid(testString, test.pos[2], test.len[2])#



From: "Andy Matthews" 
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk" 
Subject: RE: RegEx help

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.

andy

-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help

I need to extract a particular piece of data from one of my query fields 
and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need 
to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The 
Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know 
how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334360
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-08 Thread Bobby Hartsfield

If you mean test for that exact order of those three characters, you don't
really need a regex for that. It is just a constant string.

I believe it would be 

#Chr(13) & chr(10) & ' '#

 
 
.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-Original Message-
From: Debbie Morris [mailto:dmor...@sussexcountyde.gov] 
Sent: Tuesday, June 08, 2010 10:23 AM
To: cf-talk
Subject: RE: RegEx help


Thanks for the help, Jason and Andy. Turns out the character apparently
isn't a tab though. Viewing it in WireShark, it looks like there is a
carriage return (0d), a line feed (0a) and a space (20) between the age and
gender strings.

Sorry to be so dumb, but I've managed to avoid regular expressions for the
most part, so I'm really clueless now that I need it. I've tried reading
through the documentation but it all seems like Greek to me. How can I test
for the combination of those three characters?

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Monday, June 07, 2010 4:27 PM
To: cf-talk
Subject: RE: RegEx help


Assuming that those are tabs between the elements, the following will 
expand on Andy's suggestion.



#mid(testString, test.pos[2], test.len[2])#



From: "Andy Matthews" 
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk" 
Subject: RE: RegEx help

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.

andy

-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help

I need to extract a particular piece of data from one of my query fields 
and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need 
to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The 
Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know 
how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 







~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334361
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx help

2010-06-08 Thread Michael Grant

I think he wants to make it part of the t-sql code.

Do you really need to test for all three of these? Will there ever be a
carriage return in the Age value that's valid? If not why not just test for
the carriage return alone as the end part of your regex?


On Tue, Jun 8, 2010 at 11:01 AM, Bobby Hartsfield wrote:

>
> If you mean test for that exact order of those three characters, you don't
> really need a regex for that. It is just a constant string.
>
> I believe it would be
>
> #Chr(13) & chr(10) & ' '#
>
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Debbie Morris [mailto:dmor...@sussexcountyde.gov]
> Sent: Tuesday, June 08, 2010 10:23 AM
> To: cf-talk
> Subject: RE: RegEx help
>
>
> Thanks for the help, Jason and Andy. Turns out the character apparently
> isn't a tab though. Viewing it in WireShark, it looks like there is a
> carriage return (0d), a line feed (0a) and a space (20) between the age and
> gender strings.
>
> Sorry to be so dumb, but I've managed to avoid regular expressions for the
> most part, so I'm really clueless now that I need it. I've tried reading
> through the documentation but it all seems like Greek to me. How can I test
> for the combination of those three characters?
>
> Deb
>
> -Original Message-
> From: Jason Fisher [mailto:ja...@wanax.com]
> Sent: Monday, June 07, 2010 4:27 PM
> To: cf-talk
> Subject: RE: RegEx help
>
>
> Assuming that those are tabs between the elements, the following will
> expand on Andy's suggestion.
>
> 
> 
> #mid(testString, test.pos[2], test.len[2])#
>
> 
>
> From: "Andy Matthews" 
> Sent: Monday, June 07, 2010 3:32 PM
> To: "cf-talk" 
> Subject: RE: RegEx help
>
> If you can always depend on Age: before the desired string, and what looks
> like a tab afterwards, then it's trivial:
>
> Age:[0-9a-Z]+\t
>
> That assumes that the age will be any combination of letters and numbers,
> and also allows for upper and lower case.
>
> andy
>
> -Original Message-
> From: Debbie Morris [mailto:ddicker...@macromedia.com]
> Sent: Monday, June 07, 2010 1:51 PM
> To: cf-talk
> Subject: RegEx help
>
> I need to extract a particular piece of data from one of my query fields
> and
> I'm not sure how to go about it.
>
> We have incidents in one table that can have comments in another table
> associated with them.
>
> Here's an example of one of the comments in my query results that I need
> to
> grab data from:
>
> Case Information   Problem:diff breathing   Patients:1   Four commandment
> Information   Age:2 months   Gender:Female   Conscious:Yes   Brea
>
> I need to get the Age information for any comments that contain it. The
> Age
> field always begins as shown above and the Gender field always immediately
> follows it, so I'm assuming I can work from that, but I just don't know
> how
> to go about writing it. Any thoughts would be greatly appreciated!!
>
> Deb
>
>
>
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334362
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-08 Thread Bobby Hartsfield

Oh. I never saw mention of that... and I think it's a she ;-)

.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 

-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz] 
Sent: Tuesday, June 08, 2010 11:06 AM
To: cf-talk
Subject: Re: RegEx help


I think he wants to make it part of the t-sql code.

Do you really need to test for all three of these? Will there ever be a
carriage return in the Age value that's valid? If not why not just test for
the carriage return alone as the end part of your regex?


On Tue, Jun 8, 2010 at 11:01 AM, Bobby Hartsfield
wrote:

>
> If you mean test for that exact order of those three characters, you don't
> really need a regex for that. It is just a constant string.
>
> I believe it would be
>
> #Chr(13) & chr(10) & ' '#
>
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Debbie Morris [mailto:dmor...@sussexcountyde.gov]
> Sent: Tuesday, June 08, 2010 10:23 AM
> To: cf-talk
> Subject: RE: RegEx help
>
>
> Thanks for the help, Jason and Andy. Turns out the character apparently
> isn't a tab though. Viewing it in WireShark, it looks like there is a
> carriage return (0d), a line feed (0a) and a space (20) between the age
and
> gender strings.
>
> Sorry to be so dumb, but I've managed to avoid regular expressions for the
> most part, so I'm really clueless now that I need it. I've tried reading
> through the documentation but it all seems like Greek to me. How can I
test
> for the combination of those three characters?
>
> Deb
>
> -Original Message-
> From: Jason Fisher [mailto:ja...@wanax.com]
> Sent: Monday, June 07, 2010 4:27 PM
> To: cf-talk
> Subject: RE: RegEx help
>
>
> Assuming that those are tabs between the elements, the following will
> expand on Andy's suggestion.
>
> 
> 
> #mid(testString, test.pos[2], test.len[2])#
>
> 
>
> From: "Andy Matthews" 
> Sent: Monday, June 07, 2010 3:32 PM
> To: "cf-talk" 
> Subject: RE: RegEx help
>
> If you can always depend on Age: before the desired string, and what looks
> like a tab afterwards, then it's trivial:
>
> Age:[0-9a-Z]+\t
>
> That assumes that the age will be any combination of letters and numbers,
> and also allows for upper and lower case.
>
> andy
>
> -Original Message-
> From: Debbie Morris [mailto:ddicker...@macromedia.com]
> Sent: Monday, June 07, 2010 1:51 PM
> To: cf-talk
> Subject: RegEx help
>
> I need to extract a particular piece of data from one of my query fields
> and
> I'm not sure how to go about it.
>
> We have incidents in one table that can have comments in another table
> associated with them.
>
> Here's an example of one of the comments in my query results that I need
> to
> grab data from:
>
> Case Information   Problem:diff breathing   Patients:1   Four commandment
> Information   Age:2 months   Gender:Female   Conscious:Yes   Brea
>
> I need to get the Age information for any comments that contain it. The
> Age
> field always begins as shown above and the Gender field always immediately
> follows it, so I'm assuming I can work from that, but I just don't know
> how
> to go about writing it. Any thoughts would be greatly appreciated!!
>
> Deb
>
>
>
>
>
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334363
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx help

2010-06-08 Thread Michael Grant

I'm wrong. I re-read it and it says "query fields" which when I first read I
took as database column. My mistake.
And sorry Debbie. She, not he. *_*




On Tue, Jun 8, 2010 at 11:18 AM, Bobby Hartsfield wrote:

>
> Oh. I never saw mention of that... and I think it's a she ;-)
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
>
> -Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Tuesday, June 08, 2010 11:06 AM
> To: cf-talk
> Subject: Re: RegEx help
>
>
> I think he wants to make it part of the t-sql code.
>
> Do you really need to test for all three of these? Will there ever be a
> carriage return in the Age value that's valid? If not why not just test for
> the carriage return alone as the end part of your regex?
>
>
> On Tue, Jun 8, 2010 at 11:01 AM, Bobby Hartsfield
> wrote:
>
> >
> > If you mean test for that exact order of those three characters, you
> don't
> > really need a regex for that. It is just a constant string.
> >
> > I believe it would be
> >
> > #Chr(13) & chr(10) & ' '#
> >
> >
> >
> > .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
> > Bobby Hartsfield
> > http://acoderslife.com
> >
> > -Original Message-
> > From: Debbie Morris [mailto:dmor...@sussexcountyde.gov]
> > Sent: Tuesday, June 08, 2010 10:23 AM
> > To: cf-talk
> > Subject: RE: RegEx help
> >
> >
> > Thanks for the help, Jason and Andy. Turns out the character apparently
> > isn't a tab though. Viewing it in WireShark, it looks like there is a
> > carriage return (0d), a line feed (0a) and a space (20) between the age
> and
> > gender strings.
> >
> > Sorry to be so dumb, but I've managed to avoid regular expressions for
> the
> > most part, so I'm really clueless now that I need it. I've tried reading
> > through the documentation but it all seems like Greek to me. How can I
> test
> > for the combination of those three characters?
> >
> > Deb
> >
> > -Original Message-
> > From: Jason Fisher [mailto:ja...@wanax.com]
> > Sent: Monday, June 07, 2010 4:27 PM
> > To: cf-talk
> > Subject: RE: RegEx help
> >
> >
> > Assuming that those are tabs between the elements, the following will
> > expand on Andy's suggestion.
> >
> > 
> > 
> > #mid(testString, test.pos[2], test.len[2])#
> >
> > 
> >
> > From: "Andy Matthews" 
> > Sent: Monday, June 07, 2010 3:32 PM
> > To: "cf-talk" 
> > Subject: RE: RegEx help
> >
> > If you can always depend on Age: before the desired string, and what
> looks
> > like a tab afterwards, then it's trivial:
> >
> > Age:[0-9a-Z]+\t
> >
> > That assumes that the age will be any combination of letters and numbers,
> > and also allows for upper and lower case.
> >
> > andy
> >
> > -Original Message-
> > From: Debbie Morris [mailto:ddicker...@macromedia.com]
> > Sent: Monday, June 07, 2010 1:51 PM
> > To: cf-talk
> > Subject: RegEx help
> >
> > I need to extract a particular piece of data from one of my query fields
> > and
> > I'm not sure how to go about it.
> >
> > We have incidents in one table that can have comments in another table
> > associated with them.
> >
> > Here's an example of one of the comments in my query results that I need
> > to
> > grab data from:
> >
> > Case Information   Problem:diff breathing   Patients:1   Four commandment
> > Information   Age:2 months   Gender:Female   Conscious:Yes   Brea
> >
> > I need to get the Age information for any comments that contain it. The
> > Age
> > field always begins as shown above and the Gender field always
> immediately
> > follows it, so I'm assuming I can work from that, but I just don't know
> > how
> > to go about writing it. Any thoughts would be greatly appreciated!!
> >
> > Deb
> >
> >
> >
> >
> >
> >
> >
> >
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334364
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx help

2010-06-08 Thread Kris Jones

How about something like this:


#mid(thestring,arFound["pos"][1],arFound["len"][1])#

Cheers,
Kris

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334365
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: RegEx help

2010-06-08 Thread Kris Jones

Rather, that would be, if you don't want the label of the field:
#mid(thestring,arFound["pos"][2],arFound["len"][2])#

Cheers,
Kris


On Tue, Jun 8, 2010 at 11:43 AM, Kris Jones  wrote:
> How about something like this:
>
>  refindnocase("Age:([^\r\n|\r|\n]*)[\r\n|\r|\n]",thestring,1,true) />
> #mid(thestring,arFound["pos"][1],arFound["len"][1])#

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334366
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-08 Thread Jason Fisher

Debbie,

Where 'testString' is your content, try this:



#mid(testString, test.pos[2], test.len[2])#



From: "Debbie Morris" 
Sent: Tuesday, June 08, 2010 10:24 AM
To: "cf-talk" 
Subject: RE: RegEx help

Thanks for the help, Jason and Andy. Turns out the character apparently 
isn't a tab though. Viewing it in WireShark, it looks like there is a 
carriage return (0d), a line feed (0a) and a space (20) between the age and 
gender strings.

Sorry to be so dumb, but I've managed to avoid regular expressions for the 
most part, so I'm really clueless now that I need it. I've tried reading 
through the documentation but it all seems like Greek to me. How can I test 
for the combination of those three characters?

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Monday, June 07, 2010 4:27 PM
To: cf-talk
Subject: RE: RegEx help

Assuming that those are tabs between the elements, the following will 
expand on Andy's suggestion.



#mid(testString, test.pos[2], test.len[2])#



From: "Andy Matthews" 
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk" 
Subject: RE: RegEx help

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.

andy

-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help

I need to extract a particular piece of data from one of my query fields 
and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need 
to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The 
Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know 
how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334367
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-08 Thread Debbie Morris

Thank you (and everyone else)!! This one did the trick!

Now I just need to finish the logic around it so that it doesn't break when 
there aren't any comments that match, and I can get this off my plate before I 
leave for vacation!

Thanks again!

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Tuesday, June 08, 2010 11:40 AM
To: cf-talk
Subject: RE: RegEx help


Debbie,

Where 'testString' is your content, try this:



#mid(testString, test.pos[2], test.len[2])#



From: "Debbie Morris" 
Sent: Tuesday, June 08, 2010 10:24 AM
To: "cf-talk" 
Subject: RE: RegEx help

Thanks for the help, Jason and Andy. Turns out the character apparently 
isn't a tab though. Viewing it in WireShark, it looks like there is a 
carriage return (0d), a line feed (0a) and a space (20) between the age and 
gender strings.

Sorry to be so dumb, but I've managed to avoid regular expressions for the 
most part, so I'm really clueless now that I need it. I've tried reading 
through the documentation but it all seems like Greek to me. How can I test 
for the combination of those three characters?

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Monday, June 07, 2010 4:27 PM
To: cf-talk
Subject: RE: RegEx help

Assuming that those are tabs between the elements, the following will 
expand on Andy's suggestion.



#mid(testString, test.pos[2], test.len[2])#



From: "Andy Matthews" 
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk" 
Subject: RE: RegEx help

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.

andy

-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help

I need to extract a particular piece of data from one of my query fields 
and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need 
to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The 
Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know 
how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334369
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: RegEx help

2010-06-08 Thread Bobby Hartsfield

Vaca... vacati... hmmm, I'm not sure I'm familiar with that word. 

:-P

 
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-Original Message-
From: Debbie Morris [mailto:dmor...@sussexcountyde.gov] 
Sent: Tuesday, June 08, 2010 12:45 PM
To: cf-talk
Subject: RE: RegEx help


Thank you (and everyone else)!! This one did the trick!

Now I just need to finish the logic around it so that it doesn't break when
there aren't any comments that match, and I can get this off my plate before
I leave for vacation!

Thanks again!

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Tuesday, June 08, 2010 11:40 AM
To: cf-talk
Subject: RE: RegEx help


Debbie,

Where 'testString' is your content, try this:



#mid(testString, test.pos[2], test.len[2])#



From: "Debbie Morris" 
Sent: Tuesday, June 08, 2010 10:24 AM
To: "cf-talk" 
Subject: RE: RegEx help

Thanks for the help, Jason and Andy. Turns out the character apparently 
isn't a tab though. Viewing it in WireShark, it looks like there is a 
carriage return (0d), a line feed (0a) and a space (20) between the age and 
gender strings.

Sorry to be so dumb, but I've managed to avoid regular expressions for the 
most part, so I'm really clueless now that I need it. I've tried reading 
through the documentation but it all seems like Greek to me. How can I test 
for the combination of those three characters?

Deb

-Original Message-
From: Jason Fisher [mailto:ja...@wanax.com] 
Sent: Monday, June 07, 2010 4:27 PM
To: cf-talk
Subject: RE: RegEx help

Assuming that those are tabs between the elements, the following will 
expand on Andy's suggestion.



#mid(testString, test.pos[2], test.len[2])#



From: "Andy Matthews" 
Sent: Monday, June 07, 2010 3:32 PM
To: "cf-talk" 
Subject: RE: RegEx help

If you can always depend on Age: before the desired string, and what looks
like a tab afterwards, then it's trivial:

Age:[0-9a-Z]+\t

That assumes that the age will be any combination of letters and numbers,
and also allows for upper and lower case.

andy

-Original Message-
From: Debbie Morris [mailto:ddicker...@macromedia.com] 
Sent: Monday, June 07, 2010 1:51 PM
To: cf-talk
Subject: RegEx help

I need to extract a particular piece of data from one of my query fields 
and
I'm not sure how to go about it.

We have incidents in one table that can have comments in another table
associated with them.

Here's an example of one of the comments in my query results that I need 
to
grab data from:

Case Information   Problem:diff breathing   Patients:1   Four commandment
Information   Age:2 months   Gender:Female   Conscious:Yes   Brea

I need to get the Age information for any comments that contain it. The 
Age
field always begins as shown above and the Gender field always immediately
follows it, so I'm assuming I can work from that, but I just don't know 
how
to go about writing it. Any thoughts would be greatly appreciated!!

Deb 







~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334370
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-26 Thread Charlie Griefer

rereplace( myvar, '-+', '-', 'all' )

On Mon, Jul 26, 2010 at 10:59 AM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> I want to replace any occurrence of multiple -- in string so the entire
> string only contains one - in a row after filtering.
>
> Something like this does (sort of):
>
>#Replacelist("#mayvar#","-,,---,--","-,-,-,-")#
>
> But with regex more like:
>
>#ReReplace("#myvar#","--,"-","ALL")#
>
> How do I write a reg to change all multiple -- to result in only one -?
>
> Thanks
>
>
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
>
>
> __ Information from ESET Smart Security, version of virus signature
> database 5315 (20100726) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335720
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-26 Thread Michael Grant

OT: Isn't regex elegant? Often very cryptic but any solution where I've used
regex seems both sophisticated and simple.

As you were.


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335721
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-26 Thread Robert Harrison

Thanks... I just could not get that straight. 


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged



-Original Message-
From: Charlie Griefer [mailto:charlie.grie...@gmail.com] 
Sent: Monday, July 26, 2010 2:04 PM
To: cf-talk
Subject: Re: Regex Help


rereplace( myvar, '-+', '-', 'all' )

On Mon, Jul 26, 2010 at 10:59 AM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> I want to replace any occurrence of multiple -- in string so the entire
> string only contains one - in a row after filtering.
>
> Something like this does (sort of):
>
>#Replacelist("#mayvar#","-,,---,--","-,-,-,-")#
>
> But with regex more like:
>
>#ReReplace("#myvar#","--,"-","ALL")#
>
> How do I write a reg to change all multiple -- to result in only one -?
>
> Thanks
>
>
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
>
>
> __ Information from ESET Smart Security, version of virus
signature
> database 5315 (20100726) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335722
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-26 Thread Andy Matthews

http://www.cftagstore.com/tags/cfreextract.cfm

:) 

-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com] 
Sent: Monday, July 26, 2010 1:00 PM
To: cf-talk
Subject: Regex Help


I want to replace any occurrence of multiple -- in string so the entire
string only contains one - in a row after filtering.

Something like this does (sort of):

#Replacelist("#mayvar#","-,,---,--","-,-,-,-")#

But with regex more like:

#ReReplace("#myvar#","--,"-","ALL")#

How do I write a reg to change all multiple -- to result in only one -?

Thanks




Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100
Hauppauge NY 11788
P : 631.231.6600 Ext. 119
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged



 

__ Information from ESET Smart Security, version of virus signature
database 5315 (20100726) __

The message was checked by ESET Smart Security.

http://www.eset.com
 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335723
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-26 Thread Charlie Griefer

troublemaker :D

On Mon, Jul 26, 2010 at 12:02 PM, Andy Matthews wrote:

>
> http://www.cftagstore.com/tags/cfreextract.cfm
>
> :)
>
> -Original Message-
> From: Robert Harrison [mailto:rob...@austin-williams.com]
> Sent: Monday, July 26, 2010 1:00 PM
> To: cf-talk
> Subject: Regex Help
>
>
> I want to replace any occurrence of multiple -- in string so the entire
> string only contains one - in a row after filtering.
>
> Something like this does (sort of):
>
>#Replacelist("#mayvar#","-,,---,--","-,-,-,-")#
>
> But with regex more like:
>
>#ReReplace("#myvar#","--,"-","ALL")#
>
> How do I write a reg to change all multiple -- to result in only one -?
>
> Thanks
>
>
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
>
>
> __ Information from ESET Smart Security, version of virus signature
> database 5315 (20100726) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335724
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-26 Thread Bobby Hartsfield

Sigh...

 
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: Monday, July 26, 2010 3:03 PM
To: cf-talk
Subject: RE: Regex Help


[Completely irrelevant link removed]

:) 

-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com] 
Sent: Monday, July 26, 2010 1:00 PM
To: cf-talk
Subject: Regex Help


I want to replace any occurrence of multiple -- in string so the entire
string only contains one - in a row after filtering.

Something like this does (sort of):

#Replacelist("#mayvar#","-,,---,--","-,-,-,-")#

But with regex more like:

#ReReplace("#myvar#","--,"-","ALL")#

How do I write a reg to change all multiple -- to result in only one -?

Thanks




Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100
Hauppauge NY 11788
P : 631.231.6600 Ext. 119
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.? It must be?&.

Plug in to our blog:?A&W Unplugged
http://www.austin-williams.com/unplugged



 

__ Information from ESET Smart Security, version of virus signature
database 5315 (20100726) __

The message was checked by ESET Smart Security.

http://www.eset.com
 





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335738
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-26 Thread andy matthews

You know I was kidding right?

-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Monday, July 26, 2010 6:21 PM
To: cf-talk
Subject: RE: Regex Help


Sigh...

 
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: Monday, July 26, 2010 3:03 PM
To: cf-talk
Subject: RE: Regex Help


[Completely irrelevant link removed]

:)




~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335742
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-26 Thread Dan Baughman

kidding? i already spent $15!

On Mon, Jul 26, 2010 at 6:52 PM, andy matthews wrote:

>
> You know I was kidding right?
>
> -Original Message-
> From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
> Sent: Monday, July 26, 2010 6:21 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> Sigh...
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Andy Matthews [mailto:li...@commadelimited.com]
> Sent: Monday, July 26, 2010 3:03 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> [Completely irrelevant link removed]
>
> :)
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335743
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread Michael Grant

I hope he does because your post literally made me laugh out loud.


On Mon, Jul 26, 2010 at 8:52 PM, andy matthews wrote:

>
> You know I was kidding right?
>
> -Original Message-
> From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
> Sent: Monday, July 26, 2010 6:21 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> Sigh...
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Andy Matthews [mailto:li...@commadelimited.com]
> Sent: Monday, July 26, 2010 3:03 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> [Completely irrelevant link removed]
>
> :)
>
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335748
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Robert Harrison

I knew you were kidding, but I don't have time to laugh. 

I converting all my URLs from the old variable scheme (i.e., news.cfm?id=7)
to the stupid SEO spoonfeed urls (i.e.,
news.cfm/this-is-my-article-for-stupid-lazy-google-programmers-who-cant-unde
rstand-variables). 

I hate this. I now believe Google has supplanted Microsoft as the most evil
entity on the planet.


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz] 
Sent: Monday, July 26, 2010 9:15 PM
To: cf-talk
Subject: Re: Regex Help


I hope he does because your post literally made me laugh out loud.


On Mon, Jul 26, 2010 at 8:52 PM, andy matthews
wrote:

>
> You know I was kidding right?
>
> -Original Message-
> From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
> Sent: Monday, July 26, 2010 6:21 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> Sigh...
>
>
> .:.:.:.:.:.:.:.:.:.:.:.:.:.
> Bobby Hartsfield
> http://acoderslife.com
>
> -Original Message-
> From: Andy Matthews [mailto:li...@commadelimited.com]
> Sent: Monday, July 26, 2010 3:03 PM
> To: cf-talk
> Subject: RE: Regex Help
>
>
> [Completely irrelevant link removed]
>
> :)
>
>
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335749
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread Michael Grant

Why not use url rewrite instead?
This type of thing is perfect for it, plus none of your existing links will
break.

On Tue, Jul 27, 2010 at 10:55 AM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> I knew you were kidding, but I don't have time to laugh.
>
> I converting all my URLs from the old variable scheme (i.e., news.cfm?id=7)
> to the stupid SEO spoonfeed urls (i.e.,
>
> news.cfm/this-is-my-article-for-stupid-lazy-google-programmers-who-cant-unde
> rstand-variables).
>
> I hate this. I now believe Google has supplanted Microsoft as the most evil
> entity on the planet.
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
> -Original Message-----
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Monday, July 26, 2010 9:15 PM
> To: cf-talk
> Subject: Re: Regex Help
>
>
> I hope he does because your post literally made me laugh out loud.
>
>
> On Mon, Jul 26, 2010 at 8:52 PM, andy matthews
> wrote:
>
> >
> > You know I was kidding right?
> >
> > -Original Message-
> > From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
> > Sent: Monday, July 26, 2010 6:21 PM
> > To: cf-talk
> > Subject: RE: Regex Help
> >
> >
> > Sigh...
> >
> >
> > .:.:.:.:.:.:.:.:.:.:.:.:.:.
> > Bobby Hartsfield
> > http://acoderslife.com
> >
> > -Original Message-
> > From: Andy Matthews [mailto:li...@commadelimited.com]
> > Sent: Monday, July 26, 2010 3:03 PM
> > To: cf-talk
> > Subject: RE: Regex Help
> >
> >
> > [Completely irrelevant link removed]
> >
> > :)
> >
> >
> >
> >
> >
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335750
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Robert Harrison

> Why not use url rewrite instead? 

What's that? Have a link?



Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


 

__ Information from ESET Smart Security, version of virus signature
database 5317 (20100727) __

The message was checked by ESET Smart Security.

http://www.eset.com
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335751
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread Michael Grant

http://en.wikipedia.org/wiki/Rewrite_engine

On Tue, Jul 27, 2010 at 11:17 AM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> > Why not use url rewrite instead?
>
> What's that? Have a link?
>
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
>
> __ Information from ESET Smart Security, version of virus signature
> database 5317 (20100727) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335752
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Robert Harrison

> Why not use url rewrite instead?

If it's this:
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/ that looks
good but it also requires server IIS intervention. That does not solve the
problem on all my sites and all the servers they are running on. Building
them into my own CMS permanently solves the problem and keeps my tools
portable for various server environments. In the long run it's I'm thinking
it's probably best to make my CMS tools just work that way so I'm not
thwarted by an uncooperative host.

Does that make since?


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged



-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com] 
Sent: Tuesday, July 27, 2010 11:17 AM
To: cf-talk
Subject: RE: Regex Help


> Why not use url rewrite instead? 

What's that? Have a link?



Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


 

__ Information from ESET Smart Security, version of virus signature
database 5317 (20100727) __

The message was checked by ESET Smart Security.

http://www.eset.com
 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335753
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Andy Matthews

He'd still want to change all of his existing URLs so that they're "correct"
moving forward. However, you're right, he could use ISAPI Rewrite (IIS) or
mod_rewrite (Apache) and let the web server take care of it 

andy

-Original Message-
From: Michael Grant [mailto:mgr...@modus.bz] 
Sent: Tuesday, July 27, 2010 10:05 AM
To: cf-talk
Subject: Re: Regex Help


Why not use url rewrite instead?
This type of thing is perfect for it, plus none of your existing links will
break.

On Tue, Jul 27, 2010 at 10:55 AM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> I knew you were kidding, but I don't have time to laugh.
>
> I converting all my URLs from the old variable scheme (i.e., 
> news.cfm?id=7) to the stupid SEO spoonfeed urls (i.e.,
>
> news.cfm/this-is-my-article-for-stupid-lazy-google-programmers-who-can
> t-unde
> rstand-variables).
>
> I hate this. I now believe Google has supplanted Microsoft as the most 
> evil entity on the planet.
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
> -----Original Message-
> From: Michael Grant [mailto:mgr...@modus.bz]
> Sent: Monday, July 26, 2010 9:15 PM
> To: cf-talk
> Subject: Re: Regex Help
>
>
> I hope he does because your post literally made me laugh out loud.
>
>
> On Mon, Jul 26, 2010 at 8:52 PM, andy matthews
> wrote:
>
> >
> > You know I was kidding right?
> >
> > -Original Message-
> > From: Bobby Hartsfield [mailto:bo...@acoderslife.com]
> > Sent: Monday, July 26, 2010 6:21 PM
> > To: cf-talk
> > Subject: RE: Regex Help
> >
> >
> > Sigh...
> >
> >
> > .:.:.:.:.:.:.:.:.:.:.:.:.:.
> > Bobby Hartsfield
> > http://acoderslife.com
> >
> > -Original Message-
> > From: Andy Matthews [mailto:li...@commadelimited.com]
> > Sent: Monday, July 26, 2010 3:03 PM
> > To: cf-talk
> > Subject: RE: Regex Help
> >
> >
> > [Completely irrelevant link removed]
> >
> > :)
> >
> >
> >
> >
> >
>
>
>
> 



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335754
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Andy Matthews

Fixing the  current links within your site so that they're search engine
safe will actually break ALL of your indexed links within Google, or Yahoo,
etc.

Having a URL rewrite in place alongside your code changes will allow Google
to keep your links indexed and update them the next time it indexes your
site.

My host uses ISAPI_REWRITE for IIS and here's what my .htaccess file looks
like for my blog:

RewriteEngine on
RewriteRule category/([a-zA-Z0-9-]+) index.cfm?verb=category&term=$1
RewriteRule search/([a-zA-Z0-9-,]+) index.cfm?verb=search&term=$1
RewriteRule rss/([a-zA-Z0-9-,]+)? rss.cfm?feed=$1

I personally HATE having to have the index.cfm in my links so I wrote this
to keep me from having to do that. A category link might look like this:

http://andymatthews.net/category/jQuery/

What the regex does in the second line above is to capture (regex)
everything after category/ and pass it to index.cfm as
verb=category&term=jQuery


andy


-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com] 
Sent: Tuesday, July 27, 2010 10:24 AM
To: cf-talk
Subject: RE: Regex Help


> Why not use url rewrite instead?

If it's this:
http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/ that looks
good but it also requires server IIS intervention. That does not solve the
problem on all my sites and all the servers they are running on. Building
them into my own CMS permanently solves the problem and keeps my tools
portable for various server environments. In the long run it's I'm thinking
it's probably best to make my CMS tools just work that way so I'm not
thwarted by an uncooperative host.

Does that make since?


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100
Hauppauge NY 11788
P : 631.231.6600 Ext. 119
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged



-Original Message-
From: Robert Harrison [mailto:rob...@austin-williams.com]
Sent: Tuesday, July 27, 2010 11:17 AM
To: cf-talk
Subject: RE: Regex Help


> Why not use url rewrite instead? 

What's that? Have a link?



Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


 

__ Information from ESET Smart Security, version of virus signature
database 5317 (20100727) __

The message was checked by ESET Smart Security.

http://www.eset.com
 





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335755
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread Dave Watts

> I converting all my URLs from the old variable scheme (i.e., news.cfm?id=7)
> to the stupid SEO spoonfeed urls (i.e.,
> news.cfm/this-is-my-article-for-stupid-lazy-google-programmers-who-cant-unde
> rstand-variables).
>
> I hate this. I now believe Google has supplanted Microsoft as the most evil
> entity on the planet.

Well, that's kind of dumb. Google didn't come out to your office and
make you rewrite your URLs, did they?

You can certainly use embedded URL parameters, and Google will still
index your pages. But Google, like regular people, can make more sense
out of URLs that themselves make more sense. This has nothing to do
with laziness, and everything to do with how URLs are meant to be
used:

http://www.w3.org/Provider/Style/URI

In general, when it comes to SEO, common sense is your best guide. And
there's a good argument to be made that implementation details should
be minimized or removed entirely from URLs.

> > Why not use url rewrite instead?
>
> If it's this:
> http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/ that looks
> good but it also requires server IIS intervention. That does not solve the
> problem on all my sites and all the servers they are running on. Building
> them into my own CMS permanently solves the problem and keeps my tools
> portable for various server environments. In the long run it's I'm thinking
> it's probably best to make my CMS tools just work that way so I'm not
> thwarted by an uncooperative host.

Then you should be looking at this:
http://www.tuckey.org/urlrewrite/

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335757
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Robert Harrison

> Fixing the  current links within your site so that they're search engine
safe will actually break ALL of your indexed links within Google, or Yahoo,
etc.

In this case I put in a hook old so the old links still work. They do a 301
redirect to the new link schema. That should cover the search engines and
any bookmarks.

It seems to be working... http://www.austin-williams.com/news.cfm.  All the
links are now SEO 'friendly'.  

I've set it up so the CMS automatically builds the link when new records are
added. Most of the time there is no need to change that, but I've also put
in an option to 'rebuild' a link on record update. It defaults to OFF, but
it can be forced on to do it sometimes. Here's a case in point why I did
that...

One thing we build is banking sites. So they create an account and it builds
the link: http://commercialbank.com/accounts/free-checking.  That's great,
but now the CEO they can't afford to give away checking accounts anymore, so
they need to charge $2/month. So the update the account, but
http://commercialbank.com/accounts/free-checking is misleading. In this case
they need to change the link, so they have an option to rebuild to, say:
http://commercialbank.com/accounts/really-cheap-checking. 

I see no way around this. In spite of the best efforts, some links may
occasionally be lost.


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged


 

__ Information from ESET Smart Security, version of virus signature
database 5317 (20100727) __

The message was checked by ESET Smart Security.

http://www.eset.com
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335761
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread Michael Grant

Robert:

Decided I'd check out your site.

This page is messed up: http://www.austin-williams.com/people/
Barbara Espisito's mini bio is all screwy. (Ironic that she's the copy
chief.)
Looking at the source it looks like your db entry for her is mangled pretty
badly.

On another note, who took those pictures? Was it their intent to catch
everyone in the middle of an awkward expression?




On Tue, Jul 27, 2010 at 12:11 PM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> > Fixing the  current links within your site so that they're search engine
> safe will actually break ALL of your indexed links within Google, or Yahoo,
> etc.
>
> In this case I put in a hook old so the old links still work. They do a 301
> redirect to the new link schema. That should cover the search engines and
> any bookmarks.
>
> It seems to be working... http://www.austin-williams.com/news.cfm.  All
> the
> links are now SEO 'friendly'.
>
> I've set it up so the CMS automatically builds the link when new records
> are
> added. Most of the time there is no need to change that, but I've also put
> in an option to 'rebuild' a link on record update. It defaults to OFF, but
> it can be forced on to do it sometimes. Here's a case in point why I did
> that...
>
> One thing we build is banking sites. So they create an account and it
> builds
> the link: http://commercialbank.com/accounts/free-checking.  That's great,
> but now the CEO they can't afford to give away checking accounts anymore,
> so
> they need to charge $2/month. So the update the account, but
> http://commercialbank.com/accounts/free-checking is misleading. In this
> case
> they need to change the link, so they have an option to rebuild to, say:
> http://commercialbank.com/accounts/really-cheap-checking.
>
> I see no way around this. In spite of the best efforts, some links may
> occasionally be lost.
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
>
> __ Information from ESET Smart Security, version of virus signature
> database 5317 (20100727) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335762
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Bobby Hartsfield

Absolutely... nd I thought it was pretty funny :-)
 
 
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-Original Message-
From: andy matthews [mailto:li...@commadelimited.com] 
Sent: Monday, July 26, 2010 8:52 PM
To: cf-talk
Subject: RE: Regex Help


You know I was kidding right?

-Original Message-
From: Bobby Hartsfield [mailto:bo...@acoderslife.com] 
Sent: Monday, July 26, 2010 6:21 PM
To: cf-talk
Subject: RE: Regex Help


Sigh...

 
.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 
-Original Message-
From: Andy Matthews [mailto:li...@commadelimited.com] 
Sent: Monday, July 26, 2010 3:03 PM
To: cf-talk
Subject: RE: Regex Help


[Completely irrelevant link removed]

:)






~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335763
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Regex Help

2010-07-27 Thread Robert Harrison

Hmmm. Those pages are static and
http://www.austin-williams.com/people/barbara-esposito.cfm looks fine from
here. 

What are you seeing? What browser are you on? 

As far as the pictures, I'm the Technology Director, not the Creative
Director. That is ground on which I do not tread  :-)


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged

 

__ Information from ESET Smart Security, version of virus signature
database 5318 (20100727) __

The message was checked by ESET Smart Security.

http://www.eset.com
 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335764
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread Michael Grant

It was on the link I posted. However after going to it again I see it's not
outputting the same as it was. Weird. I'm on chrome. Her text description
was displaying hundreds of little rectangles. Like when character encoding
is improper.

On Tue, Jul 27, 2010 at 12:28 PM, Robert Harrison <
rob...@austin-williams.com> wrote:

>
> Hmmm. Those pages are static and
> http://www.austin-williams.com/people/barbara-esposito.cfm looks fine from
> here.
>
> What are you seeing? What browser are you on?
>
> As far as the pictures, I'm the Technology Director, not the Creative
> Director. That is ground on which I do not tread  :-)
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
> __ Information from ESET Smart Security, version of virus signature
> database 5318 (20100727) __
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335765
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex Help

2010-07-27 Thread denstar

This is neither here nor there, but the URLRewriteFilter can go on the
actual application server, thus negating the need for IIS or Apache
intervention, and as an added bonus, can do outbound rules as well.

This means that you don't need to change your internal links from:
index.cfm?somevar=woohoo, and instead can do this:
getPageContext().getResponse().encode("index.cfm?somevar=woohoo") and
have the HTML href that is returned to the client look like this:
/somevar/woohoo (and obviously have incoming /somevar/woohoo requests
translated to index.cfm?somevar=woohoo).

You still have to wrap stuff with the encode() deal, so it's not
super-cool if you've got a lot of links various places, but it's
probably a pretty fast way to go "pretty URL style" without having to
do much more than wrap your links with encode().

Just food for thought.  I'm really liking it, and it doesn't add much overhead.

I know this probably doesn't make much sense, but I can elaborate if
anyone is actually interested.  :)

:Den

-- 
There is a specter haunting Europe, the specter of Communism.
Karl Marx

On Tue, Jul 27, 2010 at 9:23 AM, Robert Harrison wrote:
>
>> Why not use url rewrite instead?
>
> If it's this:
> http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/ that looks
> good but it also requires server IIS intervention. That does not solve the
> problem on all my sites and all the servers they are running on. Building
> them into my own CMS permanently solves the problem and keeps my tools
> portable for various server environments. In the long run it's I'm thinking
> it's probably best to make my CMS tools just work that way so I'm not
> thwarted by an uncooperative host.

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335772
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Regex question

2010-08-19 Thread Ian Skinner

  On 8/19/2010 8:32 AM, Ian Skinner wrote:
> I need to turn some relative links into absolute links in a string.
>
> I have this rereplace() working well to do that.
>
> rereplace(links,'(href=")([^"]*")','\1http://www.cdpr.ca.gov\2','ALL')

Thank you Ian, adding the forward slash[/]  character in two places 
solved this nicely!

rereplace(links,'(href=")/([^"]*")','\1http://www.cdpr.ca.gov/\2','ALL')

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336417
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: REGEX hell

2010-11-22 Thread Jerry Johnson

no need to escape the space char with a slash.

are you sure it is only 1 space, and are you sure it is a space char
(chr(32))?

If so, remove the slash in front of the space, and it should work.

also, pet peeve, no need for the ## around the function. Works either way,
though, so ignore if you prefer.

Jerry Milo Johnson

On Mon, Nov 22, 2010 at 8:48 PM, Rick Colman  wrote:

>
> I am trying to replace two trailing parens )) with a single paren.
>
> here is a sample string:
>
> (K AAA) (N AAC) (E GAA) )
>
> looks like there is a space in between the two )), so I tried:
>
> 
>
> but this is not working.
>
> Any ideas as two what is wrong greatly appreciated.
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339442
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: REGEX hell

2010-11-22 Thread Michael Dinowitz

Are you sure it's a space and not 2 spaces? Or a tab? Try using \s* to
indicate that there may be one or more space characters.

\)\s*\)



On Mon, Nov 22, 2010 at 8:48 PM, Rick Colman  wrote:

>
> I am trying to replace two trailing parens )) with a single paren.
>
> here is a sample string:
>
> (K AAA) (N AAC) (E GAA) )
>
> looks like there is a space in between the two )), so I tried:
>
> 
>
> but this is not working.
>
> Any ideas as two what is wrong greatly appreciated.
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339443
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


  1   2   3   4   5   6   7   8   9   10   >