Regular expression question

2002-12-23 Thread Lofback, Chris
Is there a way to return just the string that a REFind matches?  I'm trying
to pull an email address out of a block of text.  I can find the beginning
using this:

REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z
]{2,3})|(aero|coop|info|museum|name))",BlockOfText)

But I don't see how to match the end.  It seems like I need to return the
"\1" back reference, but how?

Thanks,
Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com

~|
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.



Regular Expression Question

2002-04-19 Thread Smith, Daron [PA]

If I want to do a regular expression replace to remove several (but not all
HTML tags) what is the syntax that I should use.  I want the expresion to
find, for example, the '' tag regardless of what is
in the middle.  I've tried this ","","ALL")> but that doesn't
seem to work.  Any suggestions?

Thanks for your help

Daron J. Smith
Web Developer
PSEA

[EMAIL PROTECTED]
717-255-7141 
1-800-944-PSEA (7732) x 7141
Please note new email address (old one with 'mail' will soon expire)

 
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



regular expression question

2003-08-01 Thread Jason Rogoz
does anyone know how to write the regular expression to find 2 out of three
words in a row?  I need to determine is a string has "and or" or "not and"
etc in the string.

Thanks
~|
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: Regular expression question

2002-12-23 Thread Raymond Camden
Add the 3rd and 4th optional args - the 3rd arg, where to start, should
be set to 1, and the 4th, is a boolean that specifies if you want the
matched expressions returned. You will get a struct of two arrays, pos
and len, where pos[x] and len[x] is the position and length of the Xth
matched subexpression.

===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc

Email: [EMAIL PROTECTED]
WWW  : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -Original Message-
> From: Lofback, Chris [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 23, 2002 10:22 AM
> To: CF-Talk
> Subject: Regular expression question
> 
> 
> Is there a way to return just the string that a REFind 
> matches?  I'm trying to pull an email address out of a block 
> of text.  I can find the beginning using this:
> 
> REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-
> 9-]+)*\.(([a-z
> ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
> 
> But I don't see how to match the end.  It seems like I need 
> to return the "\1" back reference, but how?
> 
> Thanks,
> Chris Lofback
> Sr. Web Developer
> 
> TRX Integration
> 28051 US 19 N., Ste. C
> Clearwater, FL  33761
> www.trxi.com
> 
> 
~|
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



RE: Regular expression question

2002-12-23 Thread Ben Doom
Or, if you prefer to simply return the matched bit in string form, you can
do what I do (being a perlish kinda guy):

newstring = rereplace(string,
".*(whatever(yes you can use internal groupings) blah).*", "\1");

Probably a lot less efficient than Ray's refind, but to my mind it makes a
lot more sense.

As always with RE questions:
http://www.houseoffusion.com/cf_lists/index.cfm?method=threads&forumid=21
Read, Post to, or Join the list here for all your RegEx needs.  :-)


  --Ben Doom
Programmer & General Lackey
Moonbow Software

: -Original Message-
: From: Raymond Camden [mailto:[EMAIL PROTECTED]]
: Sent: Monday, December 23, 2002 11:29 AM
: To: CF-Talk
: Subject: RE: Regular expression question
:
:
: Add the 3rd and 4th optional args - the 3rd arg, where to start, should
: be set to 1, and the 4th, is a boolean that specifies if you want the
: matched expressions returned. You will get a struct of two arrays, pos
: and len, where pos[x] and len[x] is the position and length of the Xth
: matched subexpression.
:
: ===
: Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
:
: Email: [EMAIL PROTECTED]
: WWW  : www.camdenfamily.com/morpheus
: Yahoo IM : morpheus
:
: "My ally is the Force, and a powerful ally it is." - Yoda
:
: > -Original Message-
: > From: Lofback, Chris [mailto:[EMAIL PROTECTED]]
: > Sent: Monday, December 23, 2002 10:22 AM
: > To: CF-Talk
: > Subject: Regular expression question
: >
: >
: > Is there a way to return just the string that a REFind
: > matches?  I'm trying to pull an email address out of a block
: > of text.  I can find the beginning using this:
: >
: > REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-
: > 9-]+)*\.(([a-z
: > ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
: >
: > But I don't see how to match the end.  It seems like I need
: > to return the "\1" back reference, but how?
: >
: > Thanks,
: > Chris Lofback
: > Sr. Web Developer
: >
: > TRX Integration
: > 28051 US 19 N., Ste. C
: > Clearwater, FL  33761
: > www.trxi.com
: >
: >
: 
~|
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



RE: Regular expression question

2002-12-23 Thread Lofback, Chris
Hmm.  I like this more-concise method, but I only get the last character of
the user ID rather than the full user ID.  For example, I use this...

REReplace(Target,".*(['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\
(([a-z]{2,3})|(aero|coop|info|museum|name))).*", "\1")

..on "[EMAIL PROTECTED]" and I get "[EMAIL PROTECTED]".  Obviously, I'm rusty with RegEx
but I seem to recall something about "greedy" RegEx pattern matching.  Is
this maybe the cause?

Thanks,
Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com


> -Original Message-
> From: Ben Doom [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 23, 2002 12:44 PM
> To: CF-Talk
> Subject: RE: Regular expression question
> 
> 
> Or, if you prefer to simply return the matched bit in string 
> form, you can
> do what I do (being a perlish kinda guy):
> 
> newstring = rereplace(string,
> ".*(whatever(yes you can use internal groupings) blah).*", "\1");
> 
> Probably a lot less efficient than Ray's refind, but to my 
> mind it makes a
> lot more sense.
> 
> As always with RE questions:
> http://www.houseoffusion.com/cf_lists/index.cfm?method=threads
> &forumid=21
> Read, Post to, or Join the list here for all your RegEx needs.  :-)
> 
> 
>   --Ben Doom
> Programmer & General Lackey
> Moonbow Software
> 
> : -Original Message-
> : From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> : Sent: Monday, December 23, 2002 11:29 AM
> : To: CF-Talk
> : Subject: RE: Regular expression question
> :
> :
> : Add the 3rd and 4th optional args - the 3rd arg, where to 
> start, should
> : be set to 1, and the 4th, is a boolean that specifies if 
> you want the
> : matched expressions returned. You will get a struct of two 
> arrays, pos
> : and len, where pos[x] and len[x] is the position and length 
> of the Xth
> : matched subexpression.
> :
> : 
> ==
> =
> : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
> :
> : Email: [EMAIL PROTECTED]
> : WWW  : www.camdenfamily.com/morpheus
> : Yahoo IM : morpheus
> :
> : "My ally is the Force, and a powerful ally it is." - Yoda
> :
> : > -Original Message-
> : > From: Lofback, Chris [mailto:[EMAIL PROTECTED]]
> : > Sent: Monday, December 23, 2002 10:22 AM
> : > To: CF-Talk
> : > Subject: Regular expression question
> : >
> : >
> : > Is there a way to return just the string that a REFind
> : > matches?  I'm trying to pull an email address out of a block
> : > of text.  I can find the beginning using this:
> : >
> : > REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-
> : > 9-]+)*\.(([a-z
> : > ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
> : >
> : > But I don't see how to match the end.  It seems like I need
> : > to return the "\1" back reference, but how?
> : >
> : > Thanks,
> : > Chris Lofback
> : > Sr. Web Developer
> : >
> : > TRX Integration
> : > 28051 US 19 N., Ste. C
> : > Clearwater, FL  33761
> : > www.trxi.com
> : >
> : >
> : 
> 
~|
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.



RE: Regular expression question

2002-12-23 Thread Ben Doom
Yes, it's the greedy match that's getting you -- I didn't think about that.
If you can classify the char that preceeds the email address (i.e. it's a
space or punctuation or either) then you can simply follow the .* with that
char or char class.  However, if the email can come at the beginning of the
string, you'll have a problem.

HTH.



  --Ben Doom
Programmer & General Lackey
Moonbow Software

: -Original Message-
: From: Lofback, Chris [mailto:[EMAIL PROTECTED]]
: Sent: Monday, December 23, 2002 2:05 PM
: To: CF-Talk
: Subject: RE: Regular expression question
:
:
: Hmm.  I like this more-concise method, but I only get the last
: character of
: the user ID rather than the full user ID.  For example, I use this...
:
: REReplace(Target,".*(['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-
: z0-9-]+)*\
: (([a-z]{2,3})|(aero|coop|info|museum|name))).*", "\1")
:
: ..on "[EMAIL PROTECTED]" and I get "[EMAIL PROTECTED]".  Obviously, I'm rusty with RegEx
: but I seem to recall something about "greedy" RegEx pattern matching.  Is
: this maybe the cause?
:
: Thanks,
: Chris Lofback
: Sr. Web Developer
:
: TRX Integration
: 28051 US 19 N., Ste. C
: Clearwater, FL  33761
: www.trxi.com
:
:
: > -Original Message-
: > From: Ben Doom [mailto:[EMAIL PROTECTED]]
: > Sent: Monday, December 23, 2002 12:44 PM
: > To: CF-Talk
: > Subject: RE: Regular expression question
: >
: >
: > Or, if you prefer to simply return the matched bit in string
: > form, you can
: > do what I do (being a perlish kinda guy):
: >
: > newstring = rereplace(string,
: > ".*(whatever(yes you can use internal groupings) blah).*", "\1");
: >
: > Probably a lot less efficient than Ray's refind, but to my
: > mind it makes a
: > lot more sense.
: >
: > As always with RE questions:
: > http://www.houseoffusion.com/cf_lists/index.cfm?method=threads
: > &forumid=21
: > Read, Post to, or Join the list here for all your RegEx needs.  :-)
: >
: >
: >   --Ben Doom
: > Programmer & General Lackey
: >     Moonbow Software
: >
: > : -Original Message-
: > : From: Raymond Camden [mailto:[EMAIL PROTECTED]]
: > : Sent: Monday, December 23, 2002 11:29 AM
: > : To: CF-Talk
: > : Subject: RE: Regular expression question
: > :
: > :
: > : Add the 3rd and 4th optional args - the 3rd arg, where to
: > start, should
: > : be set to 1, and the 4th, is a boolean that specifies if
: > you want the
: > : matched expressions returned. You will get a struct of two
: > arrays, pos
: > : and len, where pos[x] and len[x] is the position and length
: > of the Xth
: > : matched subexpression.
: > :
: > :
: > ==
: > =
: > : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
: > :
: > : Email: [EMAIL PROTECTED]
: > : WWW  : www.camdenfamily.com/morpheus
: > : Yahoo IM : morpheus
: > :
: > : "My ally is the Force, and a powerful ally it is." - Yoda
: > :
: > : > -Original Message-
: > : > From: Lofback, Chris [mailto:[EMAIL PROTECTED]]
: > : > Sent: Monday, December 23, 2002 10:22 AM
: > : > To: CF-Talk
: > : > Subject: Regular expression question
: > : >
: > : >
: > : > Is there a way to return just the string that a REFind
: > : > matches?  I'm trying to pull an email address out of a block
: > : > of text.  I can find the beginning using this:
: > : >
: > : > REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-
: > : > 9-]+)*\.(([a-z
: > : > ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
: > : >
: > : > But I don't see how to match the end.  It seems like I need
: > : > to return the "\1" back reference, but how?
: > : >
: > : > Thanks,
: > : > Chris Lofback
: > : > Sr. Web Developer
: > : >
: > : > TRX Integration
: > : > 28051 US 19 N., Ste. C
: > : > Clearwater, FL  33761
: > : > www.trxi.com
: > : >
: > : >
: > :
: >
: 
~|
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



RE: Regular expression question

2002-12-23 Thread Raymond Camden
FYI, MX does allow for non-greedy regex.

===
Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc

Email: [EMAIL PROTECTED]
WWW  : www.camdenfamily.com/morpheus
Yahoo IM : morpheus

"My ally is the Force, and a powerful ally it is." - Yoda 

> -Original Message-
> From: Ben Doom [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, December 23, 2002 1:17 PM
> To: CF-Talk
> Subject: RE: Regular expression question
> 
> 
> Yes, it's the greedy match that's getting you -- I didn't 
> think about that. If you can classify the char that preceeds 
> the email address (i.e. it's a space or punctuation or 
> either) then you can simply follow the .* with that char or 
> char class.  However, if the email can come at the beginning 
> of the string, you'll have a problem.
> 

~|
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



Re: Regular expression question

2002-12-23 Thread Jerry Johnson
if you are too lazy to try Ray's suggestion (as I often am), something like this might 
get you there.



(Of course, this assumes there was an email to find, otherwise 
emailAddress=blockoftext)
FWIW
Jerry

>>> [EMAIL PROTECTED] 12/23/02 11:22AM >>>
Is there a way to return just the string that a REFind matches?  I'm trying
to pull an email address out of a block of text.  I can find the beginning
using this:

REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z
]{2,3})|(aero|coop|info|museum|name))",BlockOfText)

But I don't see how to match the end.  It seems like I need to return the
"\1" back reference, but how?

Thanks,
Chris Lofback
Sr. Web Developer

TRX Integration
28051 US 19 N., Ste. C
Clearwater, FL  33761
www.trxi.com 


~|
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



RE: Regular expression question

2002-12-23 Thread Jerry Johnson
I think the version I sent handles these issues.

Jerry Johnson

>>> [EMAIL PROTECTED] 12/23/02 02:17PM >>>
Yes, it's the greedy match that's getting you -- I didn't think about that.
If you can classify the char that preceeds the email address (i.e. it's a
space or punctuation or either) then you can simply follow the .* with that
char or char class.  However, if the email can come at the beginning of the
string, you'll have a problem.

HTH.



  --Ben Doom
Programmer & General Lackey
Moonbow Software

: -Original Message-
: From: Lofback, Chris [mailto:[EMAIL PROTECTED]] 
: Sent: Monday, December 23, 2002 2:05 PM
: To: CF-Talk
: Subject: RE: Regular expression question
:
:
: Hmm.  I like this more-concise method, but I only get the last
: character of
: the user ID rather than the full user ID.  For example, I use this...
:
: REReplace(Target,".*(['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-
: z0-9-]+)*\
: (([a-z]{2,3})|(aero|coop|info|museum|name))).*", "\1")
:
: ..on "[EMAIL PROTECTED]" and I get "[EMAIL PROTECTED]".  Obviously, I'm rusty with RegEx
: but I seem to recall something about "greedy" RegEx pattern matching.  Is
: this maybe the cause?
:
: Thanks,
: Chris Lofback
: Sr. Web Developer
:
: TRX Integration
: 28051 US 19 N., Ste. C
: Clearwater, FL  33761
: www.trxi.com 
:
:
: > -Original Message-
: > From: Ben Doom [mailto:[EMAIL PROTECTED]] 
: > Sent: Monday, December 23, 2002 12:44 PM
: > To: CF-Talk
: > Subject: RE: Regular expression question
: >
: >
: > Or, if you prefer to simply return the matched bit in string
: > form, you can
: > do what I do (being a perlish kinda guy):
: >
: > newstring = rereplace(string,
: > ".*(whatever(yes you can use internal groupings) blah).*", "\1");
: >
: > Probably a lot less efficient than Ray's refind, but to my
: > mind it makes a
: > lot more sense.
: >
: > As always with RE questions:
: > http://www.houseoffusion.com/cf_lists/index.cfm?method=threads 
: > &forumid=21
: > Read, Post to, or Join the list here for all your RegEx needs.  :-)
: >
: >
: >   --Ben Doom
: > Programmer & General Lackey
: > Moonbow Software
: >
: > : -Original Message-
: > : From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
: > : Sent: Monday, December 23, 2002 11:29 AM
: > : To: CF-Talk
: > : Subject: RE: Regular expression question
: > :
: > :
: > : Add the 3rd and 4th optional args - the 3rd arg, where to
: > start, should
: > : be set to 1, and the 4th, is a boolean that specifies if
: > you want the
: > : matched expressions returned. You will get a struct of two
: > arrays, pos
: > : and len, where pos[x] and len[x] is the position and length
: > of the Xth
: > : matched subexpression.
: > :
: > :
: > ==
: > =
: > : Raymond Camden, ColdFusion Jedi Master for Mindseye, Inc
: > :
: > : Email: [EMAIL PROTECTED] 
: > : WWW  : www.camdenfamily.com/morpheus 
: > : Yahoo IM : morpheus
: > :
: > : "My ally is the Force, and a powerful ally it is." - Yoda
: > :
: > : > -Original Message-
: > : > From: Lofback, Chris [mailto:[EMAIL PROTECTED]] 
: > : > Sent: Monday, December 23, 2002 10:22 AM
: > : > To: CF-Talk
: > : > Subject: Regular expression question
: > : >
: > : >
: > : > Is there a way to return just the string that a REFind
: > : > matches?  I'm trying to pull an email address out of a block
: > : > of text.  I can find the beginning using this:
: > : >
: > : > REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-
: > : > 9-]+)*\.(([a-z
: > : > ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
: > : >
: > : > But I don't see how to match the end.  It seems like I need
: > : > to return the "\1" back reference, but how?
: > : >
: > : > Thanks,
: > : > Chris Lofback
: > : > Sr. Web Developer
: > : >
: > : > TRX Integration
: > : > 28051 US 19 N., Ste. C
: > : > Clearwater, FL  33761
: > : > www.trxi.com 
: > : >
: > : >
: > :
: >
: 

~|
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



RE: Regular expression question

2002-12-23 Thread Ben Doom
Nice.  I like that.  I hadn't thought of using a null character in a piped
chooser (or whatever you want to call that.  I'm sure it has a name :-)



  --Ben Doom
Programmer & General Lackey
Moonbow Software

: -Original Message-
: From: Jerry Johnson [mailto:[EMAIL PROTECTED]]
: Sent: Monday, December 23, 2002 2:29 PM
: To: CF-Talk
: Subject: Re: Regular expression question
:
:
: if you are too lazy to try Ray's suggestion (as I often am),
: something like this might get you there.
:
: 
:
: (Of course, this assumes there was an email to find, otherwise
: emailAddress=blockoftext)
: FWIW
: Jerry
:
: >>> [EMAIL PROTECTED] 12/23/02 11:22AM >>>
: Is there a way to return just the string that a REFind matches?
: I'm trying
: to pull an email address out of a block of text.  I can find the beginning
: using this:
:
: REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+
: )*\.(([a-z
: ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
:
: But I don't see how to match the end.  It seems like I need to return the
: "\1" back reference, but how?
:
: Thanks,
: Chris Lofback
: Sr. Web Developer
:
: TRX Integration
: 28051 US 19 N., Ste. C
: Clearwater, FL  33761
: www.trxi.com
:
:
: 
~|
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.



RE: Regular expression question

2002-12-23 Thread Jerry Johnson
I've never used it before either. 

Must be the tacos at lunch.

=)

Jerry Johnson

>>> [EMAIL PROTECTED] 12/23/02 02:38PM >>>
Nice.  I like that.  I hadn't thought of using a null character in a piped
chooser (or whatever you want to call that.  I'm sure it has a name :-)



  --Ben Doom
Programmer & General Lackey
Moonbow Software

: -Original Message-
: From: Jerry Johnson [mailto:[EMAIL PROTECTED]] 
: Sent: Monday, December 23, 2002 2:29 PM
: To: CF-Talk
: Subject: Re: Regular expression question
:
:
: if you are too lazy to try Ray's suggestion (as I often am),
: something like this might get you there.
:
: 
:
: (Of course, this assumes there was an email to find, otherwise
: emailAddress=blockoftext)
: FWIW
: Jerry
:
: >>> [EMAIL PROTECTED] 12/23/02 11:22AM >>>
: Is there a way to return just the string that a REFind matches?
: I'm trying
: to pull an email address out of a block of text.  I can find the beginning
: using this:
:
: REFindNoCase("['_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+
: )*\.(([a-z
: ]{2,3})|(aero|coop|info|museum|name))",BlockOfText)
:
: But I don't see how to match the end.  It seems like I need to return the
: "\1" back reference, but how?
:
: Thanks,
: Chris Lofback
: Sr. Web Developer
:
: TRX Integration
: 28051 US 19 N., Ste. C
: Clearwater, FL  33761
: www.trxi.com 
:
:
: 

~|
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
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm



RE: Regular Expression Question

2002-04-19 Thread Kevin Schmidt

Rereplacenocase((]*>", "", "ALL")

-Original Message-
From: Smith, Daron [PA] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, April 19, 2002 10:29 AM
To: CF-Talk
Subject: Regular Expression Question

If I want to do a regular expression replace to remove several (but not
all
HTML tags) what is the syntax that I should use.  I want the expresion
to
find, for example, the '' tag regardless of what
is
in the middle.  I've tried this ","","ALL")> but that doesn't
seem to work.  Any suggestions?

Thanks for your help

Daron J. Smith
Web Developer
PSEA

[EMAIL PROTECTED]
717-255-7141 
1-800-944-PSEA (7732) x 7141
Please note new email address (old one with 'mail' will soon expire)

 
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
__
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: Regular Expression Question

2002-04-19 Thread Michael Dinowitz

REReplaceNoCase(string, ']*>', '', 'all')
This will look for an open bracket (<) that may or may not be followed by a / followed 
by the word font then followed by any number of characters that is not a close bracket 
(>). This will be replaced by a blank for all occurrences in the string. Is this what 
you want?


At 11:29 AM 4/19/02, you wrote:
>If I want to do a regular expression replace to remove several (but not all
>HTML tags) what is the syntax that I should use.  I want the expresion to
>find, for example, the '' tag regardless of what is
>in the middle.  I've tried this mystring=rereplacenocase(mystring,"^","","ALL")> but that doesn't
>seem to work.  Any suggestions?
>
>Thanks for your help
>
>Daron J. Smith
>Web Developer
>PSEA
>
>[EMAIL PROTECTED]
>717-255-7141 
>1-800-944-PSEA (7732) x 7141
>Please note new email address (old one with 'mail' will soon expire)
>
> 
>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 

__
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: Regular Expression Question

2002-04-19 Thread Jerry Johnson

mystring=rereplacenocase(mystring,"]*>","","ALL")>

What this says is...

find a < followed by the word FONT, followed by zero or more characters that are not a 
> followed by a >


Yours said...

Find a string that starts with  with nothing else in the string.

(The ^ indicates start at the begining of the string (or line))
(The $ indicates ends at the end of a string (or line))

So you were basically checking for a string that was 

HTH
Jerry

>>> [EMAIL PROTECTED] 04/19/02 11:29AM >>>
If I want to do a regular expression replace to remove several (but not all
HTML tags) what is the syntax that I should use.  I want the expresion to
find, for example, the '' tag regardless of what is
in the middle.  I've tried this ","","ALL")> but that doesn't
seem to work.  Any suggestions?

Thanks for your help

Daron J. Smith
Web Developer
PSEA

[EMAIL PROTECTED] 
717-255-7141 
1-800-944-PSEA (7732) x 7141
Please note new email address (old one with 'mail' will soon expire)

 
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

__
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



Another regular expression question

2001-04-24 Thread JAAV

Hi,

Yes, I'm a newbie   :)   but it's a short question:

How can I check if an string contains alpha-numeric characters only?
I'm trying to check if a login name (given by the user) is valid or not.

I'm using something like:
#REFindNoCase('[[:alpha]]*|[[:digit]]*',attributes.usuario)# but it doesn't
work.

BTW, some links of POSIX regular expression are welcome.

thanks in advance

~JAAV


~~
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



quick regular expression question

2002-02-20 Thread Mark W. Breneman

I seem to be having a problem with this regular expression.  Can anyone tell
me why?  It must be something simple.

[[:space:]a-z0-9A-Z[:punct:][:space:]]+

All I am trying to do is select everything between some pesky div tags.

Thanks

__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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



Quick Regular Expression Question.

2004-06-23 Thread Che Vilnonis
Hello all. I use the following to regular _expression_ to validate zipcodes.


	
	


When a customer inputs a 9 digit zip code WITHOUT the hyphen, no error is
set. (i.e. 902101444)
How would I modify this to incorporate a mandatory hyphen when a 9 digit zip
code is inputed and still work for all other zip codes?

TIA...Che
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: regular expression question

2003-08-01 Thread Michael Dinowitz
'(word1 |word2 |word3 ){2,}
Word 1, 2 and 3 are all words in a sub expression. Each has a space after it.
The RegEx is looking for any 2 or more of these in a row.

Michael Dinowitz
Finding technical solutions to the problems you didn't know you had yet



> does anyone know how to write the regular expression to find 2 out of three
> words in a row?  I need to determine is a string has "and or" or "not and"
> etc in the string.
>
> Thanks
> 
~|
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

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

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



Re: Another regular expression question

2001-04-24 Thread Mark Woods

REFind("[^[:alnum:]]",attributes.usuario) will find any non-alphanumeric 
characters

The cf 4.0 docs have a decent intro chapter on regular expressions in the 
advanced book:
http://www.allaire.com/documents/cf4/dochome.htm


At 11:23 AM 4/24/2001, you wrote:
>Hi,
>
>Yes, I'm a newbie   :)   but it's a short question:
>
>How can I check if an string contains alpha-numeric characters only?
>I'm trying to check if a login name (given by the user) is valid or not.
>
>I'm using something like:
>#REFindNoCase('[[:alpha]]*|[[:digit]]*',attributes.usuario)# but it doesn't
>work.
>
>BTW, some links of POSIX regular expression are welcome.
>
>thanks in advance
>
>~JAAV
>
>
>
~~
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: Another regular expression question

2001-04-24 Thread Paul Johnston

using a ^ says "not one of these" and using [] says group these together

how about saying if you find something that is not a number or a letter:


ERROR

do processing


what you said is:

find 0 or more alpha chars and 0 or more digits next to it

which works with any string on the planet!

I hope this helps!

Paul

On Tuesday, April 24, 2001 11:24 AM, JAAV [SMTP:[EMAIL PROTECTED]] wrote:
> Hi,
> 
> Yes, I'm a newbie   :)   but it's a short question:
> 
> How can I check if an string contains alpha-numeric characters only?
> I'm trying to check if a login name (given by the user) is valid or not.
> 
> I'm using something like:
> #REFindNoCase('[[:alpha]]*|[[:digit]]*',attributes.usuario)# but it doesn't
> work.
> 
> BTW, some links of POSIX regular expression are welcome.
> 
> thanks in advance
> 
> ~JAAV
> 
> 
>
~~
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: Another regular expression question

2001-04-24 Thread JAAV

Thanks Mark and Paul...

it works!!

- Original Message -
From: "Paul Johnston" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, April 24, 2001 12:47 PM
Subject: RE: Another regular expression question


> using a ^ says "not one of these" and using [] says group these together
>
> how about saying if you find something that is not a number or a letter:
>
> 
> ERROR
> 
> do processing
> 
>
> what you said is:
>
> find 0 or more alpha chars and 0 or more digits next to it
>
> which works with any string on the planet!
>
> I hope this helps!
>
> Paul
>
> On Tuesday, April 24, 2001 11:24 AM, JAAV [SMTP:[EMAIL PROTECTED]] wrote:
> > Hi,
> >
> > Yes, I'm a newbie   :)   but it's a short question:
> >
> > How can I check if an string contains alpha-numeric characters only?
> > I'm trying to check if a login name (given by the user) is valid or not.
> >
> > I'm using something like:
> > #REFindNoCase('[[:alpha]]*|[[:digit]]*',attributes.usuario)# but it
doesn't
> > work.
> >
> > BTW, some links of POSIX regular expression are welcome.
> >
> > thanks in advance
> >
> > ~JAAV
> >
> >
> >
>
~~
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



Simple Regular Expression Question ($ and ^)

2002-01-14 Thread Jamie Jackson

Does CF's regex have an end/beginning of string anchor?

(e.g. "$" and "^", respectively, in other languages)

Thanks,
__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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



another quick regular expression question

2002-01-31 Thread Kola Oyedeji

Hi

Can anyone explain why this regex does not match every title?(i'm using it
in cfstuido on a directory of html and cfml files)

<[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*

It will not match untitled for example what am I doing wrong?

Thanks in advance

Kola
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: Quick Regular Expression Question.

2004-06-23 Thread Jerry Johnson


Lets see if I can break this down, and maybe the answer will fall out the other side.

string containing only:
5 digits
and
0 or 1 sets of ((0 or 1 dash or space) and four digits)

So, if you got rid of the 0 or 1 dash or space, and made it a manditory space in the second optional set, you should be good.



(Maybe)
Jerry Johnson

>>> [EMAIL PROTECTED] 06/23/04 11:16AM >>>
Hello all. I use the following to regular _expression_ to validate zipcodes.


	
	


When a customer inputs a 9 digit zip code WITHOUT the hyphen, no error is
set. (i.e. 902101444)
How would I modify this to incorporate a mandatory hyphen when a 9 digit zip
code is inputed and still work for all other zip codes?

TIA...Che
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Quick Regular Expression Question.

2004-06-23 Thread Pascal Peters
^\d{5}(-\d{4})?$ 

Your original one allowed a space too . If you want that it is
^\d{5}([- ]\d{4})?$

If you are not on cfmx, replace \d by [0-9]

> -Original Message-
> From: Che Vilnonis [mailto:[EMAIL PROTECTED] 
> Sent: woensdag 23 juni 2004 17:17
> To: CF-Talk
> Subject: Quick Regular _expression_ Question.
> 
> Hello all. I use the following to regular _expression_ to 
> validate zipcodes.
> 
> 
> #FORM.BillZip#)>
> 	
> 	
> 
> 
> When a customer inputs a 9 digit zip code WITHOUT the hyphen, 
> no error is set. (i.e. 902101444) How would I modify this to 
> incorporate a mandatory hyphen when a 9 digit zip code is 
> inputed and still work for all other zip codes?
> 
> TIA...Che
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Quick Regular Expression Question.

2004-06-23 Thread Che Vilnonis
that seems to work. thank you Jerry.
  -Original Message-
  From: Jerry Johnson [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, June 23, 2004 11:27 AM
  To: CF-Talk
  Subject: Re: Quick Regular _expression_ Question.

  
#FORM.BillZip#)>

  Lets see if I can break this down, and maybe the answer will fall out the
other side.

  string containing only:
  5 digits
  and
  0 or 1 sets of ((0 or 1 dash or space) and four digits)

  So, if you got rid of the 0 or 1 dash or space, and made it a manditory
space in the second optional set, you should be good.

  

  (Maybe)
  Jerry Johnson

  >>> [EMAIL PROTECTED] 06/23/04 11:16AM >>>
  Hello all. I use the following to regular _expression_ to validate zipcodes.

  
#FORM.BillZip#)>
  
  
  

  When a customer inputs a 9 digit zip code WITHOUT the hyphen, no error is
  set. (i.e. 902101444)
  How would I modify this to incorporate a mandatory hyphen when a 9 digit
zip
  code is inputed and still work for all other zip codes?

  TIA...Che
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Quick Regular Expression Question.

2004-06-23 Thread Ben Doom
Currently, you have:
^[[:digit:]]{5}(( |-)?[[:digit:]]{4})?$

( |-) represents a space or hypen.  If you just want a hypen, you don't 
need the parens, space, or pipe.

( |-)? means that the space or hypen is optional.

So, if you want to force a hypen for 9-digit zipcodes, you would want
^[[:digit:]]{5}(-[[:digit:]]{4})?$

--Ben

Che Vilnonis wrote:

> Hello all. I use the following to regular _expression_ to validate zipcodes.
> 
> 
> 
> 
> 
> 
> When a customer inputs a 9 digit zip code WITHOUT the hyphen, no error is
> set. (i.e. 902101444)
> How would I modify this to incorporate a mandatory hyphen when a 9 digit zip
> code is inputed and still work for all other zip codes?
> 
> TIA...Che
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: Quick Regular Expression Question.

2004-06-23 Thread Marlon Moyer
Here's a real handy site that I use

http://www.regexlib.com

Even has an online regex tester.

Marlon

On Wed, 23 Jun 2004 11:32:48 -0400, Che Vilnonis <[EMAIL PROTECTED]> wrote:
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: Simple Regular Expression Question ($ and ^)

2002-01-14 Thread Christopher Olive

yes. $ and ^, respectively.

christopher olive, cto, vp of web development
cresco technologies, inc
410.825.0383
http://www.crescotech.com


-Original Message-
From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 14, 2002 2:08 PM
To: CF-Talk
Subject: Simple Regular Expression Question ($ and ^)


Does CF's regex have an end/beginning of string anchor?

(e.g. "$" and "^", respectively, in other languages)

Thanks,

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: Simple Regular Expression Question ($ and ^)

2002-01-14 Thread Jamie Jackson

Oh, that was difficult :-/

I just tried it, and it's working. I had tried it a long time ago, and
it failed on me (must have been a faulty code), so I wrote it off...

Thanks,
Jamie

On Mon, 14 Jan 2002 14:11:59 -0500, in cf-talk you wrote:

>yes. $ and ^, respectively.
>
>christopher olive, cto, vp of web development
>cresco technologies, inc
>410.825.0383
>http://www.crescotech.com
>
>
>-Original Message-
>From: Jamie Jackson [mailto:[EMAIL PROTECTED]]
>Sent: Monday, January 14, 2002 2:08 PM
>To: CF-Talk
>Subject: Simple Regular Expression Question ($ and ^)
>
>
>Does CF's regex have an end/beginning of string anchor?
>
>(e.g. "$" and "^", respectively, in other languages)
>
>Thanks,
>
>
__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-01-31 Thread Brent Goldman

Hi,

Use this regex:




Don't forget the NoCase, or else it won't match asdf

-Brent

> -Original Message-
> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 4:15 PM
> To: CF-Talk
> Subject: another quick regular expression question
>
>
> Hi
>
> Can anyone explain why this regex does not match every
> title?(i'm using it
> in cfstuido on a directory of html and cfml files)
>
> <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
>
> It will not match untitled for example what am
> I doing wrong?
>
> Thanks in advance
>
> Kola
> 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: another quick regular expression question

2002-01-31 Thread Steve Oliver

An easier way to do that would be something like

"(.*?)"

That will get everything between the two titles no matter what it may
be.

__
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brent Goldman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 7:28 PM
To: CF-Talk
Subject: RE: another quick regular expression question


Hi,

Use this regex:




Don't forget the NoCase, or else it won't match asdf

-Brent

> -Original Message-
> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 4:15 PM
> To: CF-Talk
> Subject: another quick regular expression question
>
>
> Hi
>
> Can anyone explain why this regex does not match every
> title?(i'm using it
> in cfstuido on a directory of html and cfml files)
>
> <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
>
> It will not match untitled for example what am
> I doing wrong?
>
> Thanks in advance
>
> Kola
> 

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-01-31 Thread Brent Goldman

> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 4:31 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> An easier way to do that would be something like
>
> "(.*?)"
>
> That will get everything between the two titles no matter what it may
> be.
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 7:28 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Hi,
>
> Use this regex:
>
>  "[[:space:]]*[[:alnum:][:punct:]]*[[:space:]]*">
> 
>
> Don't forget the NoCase, or else it won't match asdf
>
> -Brent
>
> > -Original Message-
> > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 4:15 PM
> > To: CF-Talk
> > Subject: another quick regular expression question
> >
> >
> > Hi
> >
> > Can anyone explain why this regex does not match every
> > title?(i'm using it
> > in cfstuido on a directory of html and cfml files)
> >
> > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> >
> > It will not match untitled for example what am
> > I doing wrong?
> >
> > Thanks in advance
> >
> > Kola
> >
>
> 
__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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: another quick regular expression question

2002-01-31 Thread Brent Goldman

Hi Steve,

Won't the .* pick up the  part?

-Brent

> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 4:31 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> An easier way to do that would be something like
>
> "(.*?)"
>
> That will get everything between the two titles no matter what it may
> be.
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 7:28 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Hi,
>
> Use this regex:
>
>  "[[:space:]]*[[:alnum:][:punct:]]*[[:space:]]*">
> 
>
> Don't forget the NoCase, or else it won't match asdf
>
> -Brent
>
> > -Original Message-
> > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 4:15 PM
> > To: CF-Talk
> > Subject: another quick regular expression question
> >
> >
> > Hi
> >
> > Can anyone explain why this regex does not match every
> > title?(i'm using it
> > in cfstuido on a directory of html and cfml files)
> >
> > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> >
> > It will not match untitled for example what am
> > I doing wrong?
> >
> > Thanks in advance
> >
> > Kola
> >
>
> 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: another quick regular expression question

2002-01-31 Thread Steve Oliver

It doesn't really matter, He's using CFStudio to find some
title

So either way will work.

__
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brent Goldman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 8:09 PM
To: CF-Talk
Subject: RE: another quick regular expression question


Hi Steve,

Won't the .* pick up the  part?

-Brent

> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 4:31 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> An easier way to do that would be something like
>
> "(.*?)"
>
> That will get everything between the two titles no matter what it may
> be.
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 7:28 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Hi,
>
> Use this regex:
>
>  "[[:space:]]*[[:alnum:][:punct:]]*[[:space:]]*">
> 
>
> Don't forget the NoCase, or else it won't match asdf
>
> -Brent
>
> > -Original Message-----
> > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 4:15 PM
> > To: CF-Talk
> > Subject: another quick regular expression question
> >
> >
> > Hi
> >
> > Can anyone explain why this regex does not match every
> > title?(i'm using it
> > in cfstuido on a directory of html and cfml files)
> >
> > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> >
> > It will not match untitled for example what am
> > I doing wrong?
> >
> > Thanks in advance
> >
> > Kola
> >
>
> 

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-01-31 Thread Steve Oliver

Brent, Try this :)



(.*?)","\1")>

#test#

__
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Brent Goldman [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 31, 2002 8:09 PM
To: CF-Talk
Subject: RE: another quick regular expression question


Hi Steve,

Won't the .* pick up the  part?

-Brent

> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 4:31 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> An easier way to do that would be something like
>
> "(.*?)"
>
> That will get everything between the two titles no matter what it may
> be.
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 7:28 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Hi,
>
> Use this regex:
>
>  "[[:space:]]*[[:alnum:][:punct:]]*[[:space:]]*">
> 
>
> Don't forget the NoCase, or else it won't match asdf
>
> -Brent
>
> > -Original Message-
> > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 4:15 PM
> > To: CF-Talk
> > Subject: another quick regular expression question
> >
> >
> > Hi
> >
> > Can anyone explain why this regex does not match every
> > title?(i'm using it
> > in cfstuido on a directory of html and cfml files)
> >
> > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> >
> > It will not match untitled for example what am
> > I doing wrong?
> >
> > Thanks in advance
> >
> > Kola
> >
>
> 

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: another quick regular expression question

2002-02-01 Thread Kola Oyedeji

Thanks for the replies havent tested them out yet but will they work if the
title tag actualy has spaces inside as well?
< title > 

Also could anyone see where I went wrong in my original regular expression:
<[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*

 as I'm trying get to grips with reg expressions.I assumed that * means 0 or
more occurences so the above should match untitled even if
there are no spaces or punctuation.

Thanks

Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 01:11
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Brent, Try this :)
>
> 
>
> (.*?)","\1")>
>
> #test#
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 31, 2002 8:09 PM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Hi Steve,
>
> Won't the .* pick up the  part?
>
> -Brent
>
> > -Original Message-
> > From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 4:31 PM
> > To: CF-Talk
> > Subject: RE: another quick regular expression question
> >
> >
> > An easier way to do that would be something like
> >
> > "(.*?)"
> >
> > That will get everything between the two titles no matter
> what it may
> > be.
> >
> > __
> > steve oliver
> > atnet solutions, inc.
> > http://www.atnetsolutions.com
> >
> >
> > -Original Message-
> > From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 7:28 PM
> > To: CF-Talk
> > Subject: RE: another quick regular expression question
> >
> >
> > Hi,
> >
> > Use this regex:
> >
> >  > "[[:space:]]*[[:alnum:][:punct:]]*[[:space:]]*">
> > 
> >
> > Don't forget the NoCase, or else it won't match asdf
> >
> > -Brent
> >
> > > -Original Message-
> > > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, January 31, 2002 4:15 PM
> > > To: CF-Talk
> > > Subject: another quick regular expression question
> > >
> > >
> > > Hi
> > >
> > > Can anyone explain why this regex does not match every
> > > title?(i'm using it
> > > in cfstuido on a directory of html and cfml files)
> > >
> > > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> > >
> > > It will not match untitled for example what am
> > > I doing wrong?
> > >
> > > Thanks in advance
> > >
> > > Kola
> > >
> >
> >
>
> 
__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-02-01 Thread Steve Oliver

Yeah, you were searching for spaces with that. If you have a [ ]
followed by a * then it's searching for one or more spaces.

< title > untitled 

<[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*

__
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 5:39 AM
To: CF-Talk
Subject: RE: another quick regular expression question


Thanks for the replies havent tested them out yet but will they work if
the
title tag actualy has spaces inside as well?
< title > 

Also could anyone see where I went wrong in my original regular
expression:
<[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*

 as I'm trying get to grips with reg expressions.I assumed that * means
0 or
more occurences so the above should match untitled even
if
there are no spaces or punctuation.

Thanks

Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-02-01 Thread Kola Oyedeji

Steve I thought * matched 0 or more occurences?

thanks

Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 15:34
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Yeah, you were searching for spaces with that. If you have a [ ]
> followed by a * then it's searching for one or more spaces.
>
> < title > untitled 
>
> <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 5:39 AM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Thanks for the replies havent tested them out yet but will
> they work if
> the
> title tag actualy has spaces inside as well?
> < title > 
>
> Also could anyone see where I went wrong in my original regular
> expression:
> <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
>
>  as I'm trying get to grips with reg expressions.I assumed
> that * means
> 0 or
> more occurences so the above should match untitled even
> if
> there are no spaces or punctuation.
>
> Thanks
>
> Kola Oyedeji
> Web developer
> Macromedia Certified Advanced ColdFusion 5 Developer
> ekeda ltd
> http://www.ekeda.co.uk
> (+44)020-8429-7300
>
> 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: another quick regular expression question

2002-02-01 Thread Steve Oliver

I don't think it works that way with spaces.

If I have the string "hello world"

And do a regexp for

[ ]*he[ ]*llo[ ]*wor[ ]*ld[ ]*

I don't believe that will work either,

But this way should

hello[ ]*world

Or

hello[[:space:]]*world


__
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


-Original Message-
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 10:53 AM
To: CF-Talk
Subject: RE: another quick regular expression question


Steve I thought * matched 0 or more occurences?

thanks

Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 15:34
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Yeah, you were searching for spaces with that. If you have a [ ]
> followed by a * then it's searching for one or more spaces.
>
> < title > untitled 
>
> <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 5:39 AM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Thanks for the replies havent tested them out yet but will
> they work if
> the
> title tag actualy has spaces inside as well?
> < title > 
>
> Also could anyone see where I went wrong in my original regular
> expression:
> <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
>
>  as I'm trying get to grips with reg expressions.I assumed
> that * means
> 0 or
> more occurences so the above should match untitled even
> if
> there are no spaces or punctuation.
>
> Thanks
>
> Kola Oyedeji
> Web developer
> Macromedia Certified Advanced ColdFusion 5 Developer
> ekeda ltd
> http://www.ekeda.co.uk
> (+44)020-8429-7300
>
> 

__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-02-01 Thread Matthew R. Small

 
Hi List,
I've had a few requests off-list for the code on how I print
out pages through Word. I'll go ahead and post it for everyone's
benefit.  Please feel free to write me on or off list if you have any
problems.
 
To start, you need to have Word installed on your CF server for this
unless you use DCOM - I'm not familiar with DCOM so this is what I have:
 
This is used best when you have output pages that change significantly
from user to user.  See below if you need to do something along the
lines of a mail merge document.
 
First, I generate the HTML page on the fly as if it were being output to
the browser and store it in the variable 'page':
 

 
 
Next, I write it to a file:

 
Next, I open it up in Word via CFOBJECT - COM and print it out.



 
 



objDoc = objWord.Documents;  
newDoc =
objDoc.open("C:\inetpub\web_documents\output.htm"); // Your filename
goes here
switch (form.printer) {// If you have multiple
printer you want to print to. 
case 1: {objWord.ActivePrinter = "HP
LaserJet 1200 Series PCL"; break;} // Local printer
case 2: {objWord.ActivePrinter =
"\\lana\HP LaserJet 4050 Series PCL";  break;}}//
Network pr.
po = newDoc.PageSetup;   // Get the page
setup object
po.Orientation = 1;  // Set orientation
to landscape.  Omit for normal.
po.TopMargin = 36;  // Set margins -
this Is not necessary
po.BottomMargin = 36;
po.LeftMargin = 36;
po.RightMargin = 36;

newDoc.PrintOut();   // Print the
document
newDoc.Close();   // Close the Document



newDoc.Close();   //
Catch errors and close the document and application if caught
objWord.Quit(); 




 
 I leave the application  (Word) open because if  it  closes before the
printing is done, then a dialog box pops up on the server and it must be
attended to before the printing continues.  I don't think that Office XP
has this problem but I use 2000.
 
I think that if you have a template that you want to print to - like
form letters or anything where only the same amount of information
changes  - you might be better off writing a word document that prints
them out from a mail merge document, then call that document to print:
 
First, make up a table that will contain the information that you want
to have printed on the name badges, then store that information in the
table.
 
Make up a mail merge document that uses that table as the datasource and
will print the document out as you like.
 
Next, record a word macro that follows your steps through the population
of the fields and the printout of the merged document.
 
Save all of this and then use the following code to open your document
and print it out:
 
 



 




objDoc = objWord.Documents;  
newDoc =
objDoc.open("C:\inetpub\web_documents\mergedocument.doc");
switch (form.printer) {
case 1:
{objWord.ActivePrinter = "HP LaserJet 1200 Series PCL"; break;}
case 2:
{objWord.ActivePrinter = "\\lana\HP LaserJet 4050 Series PCL"; break;}}
objWord.Run("Macroname");

newDoc.Close();



//  newDoc.Close();
objWord.Quit(); 



   
 
It takes a bit of work but it does work well.
 
Write back if you have any questions.
 
- Matt Small  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
-Original Message-
From: Helge Hetland [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 01, 2002 10:19 AM
To: Matthew R. Small
Subject: RE: Help - MS Word outputfrom CF?
 
Hello!
 
I would be very interested in some example code showing this.
 
I'm investigating ways to produce nametags (badges) directly to
Word->printer from CF.
 
Thanks,
Helge Hetland
WebSite AS
Norway
 
-Original Message-
From: Matthew R. Small [mailto:[EMAIL PROTECTED]] 
Sent: 1. februar 2002 15:58
To: CF-Talk
Subject: RE: Help - MS Word outputfrom CF?

RE: another quick regular expression question

2002-02-01 Thread Kola Oyedeji

Steve

Now i'm more confused - all of them work!

Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 16:17
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> I don't think it works that way with spaces.
>
> If I have the string "hello world"
>
> And do a regexp for
>
> [ ]*he[ ]*llo[ ]*wor[ ]*ld[ ]*
>
> I don't believe that will work either,
>
> But this way should
>
> hello[ ]*world
>
> Or
>
> hello[[:space:]]*world
>
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> -Original Message-
> From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 01, 2002 10:53 AM
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> Steve I thought * matched 0 or more occurences?
>
> thanks
>
> Kola Oyedeji
> Web developer
> Macromedia Certified Advanced ColdFusion 5 Developer
> ekeda ltd
> http://www.ekeda.co.uk
> (+44)020-8429-7300
>
>
> > -Original Message-
> > From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> > Sent: 01 February 2002 15:34
> > To: CF-Talk
> > Subject: RE: another quick regular expression question
> >
> >
> > Yeah, you were searching for spaces with that. If you have a [ ]
> > followed by a * then it's searching for one or more spaces.
> >
> > < title > untitled 
> >
> > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> >
> > ______
> > steve oliver
> > atnet solutions, inc.
> > http://www.atnetsolutions.com
> >
> >
> > -Original Message-
> > From: Kola Oyedeji [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, February 01, 2002 5:39 AM
> > To: CF-Talk
> > Subject: RE: another quick regular expression question
> >
> >
> > Thanks for the replies havent tested them out yet but will
> > they work if
> > the
> > title tag actualy has spaces inside as well?
> > < title > 
> >
> > Also could anyone see where I went wrong in my original regular
> > expression:
> > <[ ]*title[ ]*>[ ]*[[:alpha:]]*[[:punct:]]*[ ]*
> >
> >  as I'm trying get to grips with reg expressions.I assumed
> > that * means
> > 0 or
> > more occurences so the above should match
> untitled even
> > if
> > there are no spaces or punctuation.
> >
> > Thanks
> >
> > Kola Oyedeji
> > Web developer
> > Macromedia Certified Advanced ColdFusion 5 Developer
> > ekeda ltd
> > http://www.ekeda.co.uk
> > (+44)020-8429-7300
> >
> >
>
> 
__
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
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: another quick regular expression question

2002-02-01 Thread Pascal Peters

This is incorrect. the regexp below will match "hello world". Try 
running the code below
#ReFindNoCase("[ ]*hel[ ]*lo[ ]*wo[ ]*rld"," Hello 
World")#

For the original question:

<[ ]*title[ ]*>([^<]*)

this will match your title if there is no < in the title.

The expression "<[ ]*title[ ]*>(.*)" will match the 
title if you have only ONE  tag. If you have more, it will match 
everything from the first  to the last 

Pascal Peters
Certified ColdFusion (5.0) Advanced Developer
Certified Web Developer
Macromedia Certified Instructor
LR Technologies, Belgium
Tel +32 2 639 68 70
Fax +32 2 639 68 99
Email   [EMAIL PROTECTED]
Web www.lrt.be



-Original Message-
From: Steve Oliver [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 1 februari 2002 17:17
To: CF-Talk
Subject: RE: another quick regular expression question


I don't think it works that way with spaces.

If I have the string "hello world"

And do a regexp for

[ ]*he[ ]*llo[ ]*wor[ ]*ld[ ]*

I don't believe that will work either,

But this way should

hello[ ]*world

Or

hello[[:space:]]*world


__
steve oliver
atnet solutions, inc.
http://www.atnetsolutions.com


__
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
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: another quick regular expression question

2002-02-01 Thread Kola Oyedeji

Pascal

question regarding this regex:

 <[ ]*title[ ]*>([^<]*)

1. Do I need the subexpression brackets if so why?
2. SO is it because I did not account for an opening < that my regex didnt
work?

Thanks


Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -Original Message-
> From: Pascal Peters [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 16:39
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> This is incorrect. the regexp below will match "hello world". Try
> running the code below
> #ReFindNoCase("[ ]*hel[ ]*lo[ ]*wo[ ]*rld"," Hello
> World")#
>
> For the original question:
>

>
> this will match your title if there is no < in the title.
>
> The expression "<[ ]*title[ ]*>(.*)" will match the
> title if you have only ONE  tag. If you have more, it
> will match
> everything from the first  to the last 
>
> Pascal Peters
> Certified ColdFusion (5.0) Advanced Developer
> Certified Web Developer
> Macromedia Certified Instructor
> LR Technologies, Belgium
> Tel   +32 2 639 68 70
> Fax   +32 2 639 68 99
> Email [EMAIL PROTECTED]
> Web   www.lrt.be
>
>
>
> -Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: vrijdag 1 februari 2002 17:17
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> I don't think it works that way with spaces.
>
> If I have the string "hello world"
>
> And do a regexp for
>
> [ ]*he[ ]*llo[ ]*wor[ ]*ld[ ]*
>
> I don't believe that will work either,
>
> But this way should
>
> hello[ ]*world
>
> Or
>
> hello[[:space:]]*world
>
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
> 
__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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: another quick regular expression question

2002-02-01 Thread Pascal Peters

1. You only need the brackets for the subexpression if you want to do something with 
it. (Like isolating the title or eliminating the tags with back referencing). 
Otherwise, you can drop them. It's not a problem if you leave them there.
2. I dont really see why your first one didn't match untitled. It was a 
little weard because it wouldn't match a title like Hello there because 
of the space between Hello & there.
I think what you wanted to write was <[ ]*title[ ]*>[ [:alnum:][:punct:]]*.
This would have the same problems as "<[ ]*title[ ]*>(.*)" . It would 
match two or more title tags as one string (see my original message).
 
PS I don't know where you get your regex examples from, but there is a ppt on 
houseoffusion (http://www.houseoffusion.com/RegEx.ppt) and one on cfugorama 
(http://www.cfugorama.com/cfugorama/codelibrary/Regular-Expressions.cfm)
 
Hope that helps

-Oorspronkelijk bericht- 
Van: Kola Oyedeji [mailto:[EMAIL PROTECTED]] 
Verzonden: vr 1-2-2002 17:57 
Aan: CF-Talk 
CC: 
Onderwerp: RE: another quick regular expression question



Pascal

question regarding this regex:

 <[ ]*title[ ]*>([^<]*)

1. Do I need the subexpression brackets if so why?
2. SO is it because I did not account for an opening < that my regex didnt
work?

Thanks


Kola Oyedeji
Web developer
Macromedia Certified Advanced ColdFusion 5 Developer
ekeda ltd
http://www.ekeda.co.uk
(+44)020-8429-7300


> -Original Message-
> From: Pascal Peters [mailto:[EMAIL PROTECTED]]
> Sent: 01 February 2002 16:39
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> This is incorrect. the regexp below will match "hello world". Try
> running the code below
> #ReFindNoCase("[ ]*hel[ ]*lo[ ]*wo[ ]*rld"," Hello
> World")#
>
> For the original question:
>

>
> this will match your title if there is no < in the title.
>
> The expression "<[ ]*title[ ]*>(.*)" will match the
> title if you have only ONE  tag. If you have more, it
> will match
> everything from the first  to the last 
>
> Pascal Peters
> Certified ColdFusion (5.0) Advanced Developer
> Certified Web Developer
> Macromedia Certified Instructor
> LR Technologies, Belgium
> Tel   +32 2 639 68 70
> Fax   +32 2 639 68 99
> Email [EMAIL PROTECTED]
> Web   www.lrt.be
>
>
    >
    > -----Original Message-
> From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> Sent: vrijdag 1 februari 2002 17:17
> To: CF-Talk
> Subject: RE: another quick regular expression question
>
>
> I don't think it works that way with spaces.
>
> If I have the string "hello world"
>
> And do a regexp for
>
> [ ]*he[ ]*llo[ ]*wor[ ]*ld[ ]*
>
> I don't believe that will work either,
>
> But this way should
>
> hello[ ]*world
>
> Or
>
> hello[[:space:]]*world
>
>
> __
> steve oliver
> atnet solutions, inc.
> http://www.atnetsolutions.com
>
>
>

__
Why Share?
  Dedicated Win 2000 Server · PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
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