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



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