Regular Expression

2002-07-07 Thread Mark Leder

I want to do a regular expression validation on a form field (city).
However, I'm rather unfamiliar with regular expressions.

How would I rewrite the expression so that it will allow a "-" and a
space.
For Example:  "Wilkes-Barre" or "Los Angeles" would be accepted. 

I can't seem to find anything on CFLib which would allow me to accept
"-" and "spaces"

This is what I have so far:

REFindNoCase("[^a-z0-9]", str)


Thanks,
Mark

__
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



Regular Expression

2001-10-21 Thread Michael Lugassy

This is not neccesarly have to be done with coldfusion's REReplace but 
anyhow,
I'm trying to come up with a regular expression that will help me turn 
this:

[Object]
ID=2031
URL=http://www.cnn.com/
OtherSrvLev=0w33a
Category=31

Into: http://www.cnn.com/

Overall, I'm trying to find a way to remove EVERYTHING 
(numeric/alpha/special/+New lines)
from "[Object]" over to "URL=", keep everything from URL= to the New 
line and again, remove
everything from OtherSrvLev to the end.
So I will be left with a URL alone.

Anyone?

Michael.


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



Regular Expression

2001-12-04 Thread Harry Klein

I wonder if you could help me with a regular expression.
 
I try to find all  tags with the following syntax:
 

 
In plain english: I try to find all  tags. After 
 
Again: I try to find wrong  calls with a deprecated attribute
(MAXHSIZE).
 
Thanks for your help,
Harry Klein
-- 
Harry Klein | Konzeption und Entwicklung
CONTENS Software GmbH
Heimeranstr. 68, 80339 München
Fon: +49 (0)89 5199 69-0 | Fax: +49 (0)89 5199 69 78
< mailto:[EMAIL PROTECTED]> | < http://www.contens.de/> 


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



Regular Expression

2001-06-06 Thread Douglas Jordon

Hi,

I need a Regular Expression to remove muliple spaces within a string but
leave single spaces. I poked around and came up with:

 

Not working. What am I doing wrong?

TIA,

Douglas Jordon


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



Regular Expression

2004-12-12 Thread vishnu prasad
Hi all 
need an help in requlaer expression
i have a string like this 
'this is samp'le data to in'sert'

now i need to replace the like this usign regular expression
'this is samp''le data to in''sert'


 

~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

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


Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the
string as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
space, all with the _ character.

Thanks
-- Jeff

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



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.



SOT: Regular Expression

2003-01-23 Thread Mark Leder
Are there any resources / tutorials / tools / Cftags / UDF / CFC's /
functions that would allow a plain-text string to be converted to ASCII HTML
code? (ie, A = A and so on)

Thanks, Mark 


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

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




regular expression help

2002-07-09 Thread Mark Warrick

Hello,

I've got a form field in which I want to allow people to enter HTML tags
(formatted stories for the web), but only a limited set of them such as
heading, bold, and italic tags so that they don't mess up the overall
formatting of the page.

What I'd like to do is automatically strip out any other HTML tag (or
JavaScript, CSS, DHTML, etc.) from the submission but leave the safe tags.
I'm thinking that using a regular expression string to do this would be the
way to go, however there is something to consider about that idea.  The data
ends up in an NTEXT field in the SQL database which is capable of storing a
lot of data and I suspect people might be typing as much as a few pages of
text into this field.  So I'm worried that a regular expression might take
too long to parse through all the entered text.

Perhaps I'm missing something obvious here.  Anyone have any suggestions?

---mark


Mark Warrick ([EMAIL PROTECTED])
Founder, Fusioneers.com / CTO, ZapConnect.com
Phone: 714-547-5386 / 714-667-0203 / Efax: 801-730-7289
http://www.warrick.net / http://www.fusioneers.com
http://www.zapconnect.com
ICQ: 125160 AIM: markwarric Yahoo: Serengeti



__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



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 Help

2000-06-22 Thread Nicole R. Lane

Hi:

I'm trying to replace the new line character with  for every line
between the ".nf" and ".fi" tags.


Sample Text:
 -
text

.nf
Prepared by:
Richard E. Wallace
Bureau of Audits

Reviewed by:
C. Joseph Meisinger
Fiscal Office
.fi

more text

-

I was thinking this, but it doesn't work:

", "ALL")>

Any ideas?

Thanks,Nicole

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



OT: Regular Expression

2004-01-02 Thread Kevin Marino
I have built a regEx parse the following lines, these are from the CF
mailsent.log

"Information","scheduler-0","12/29/03","15:41:19",,"Mail: 'Report Examines
U.S. Long-Term Care Spending' From:'John Noone <[EMAIL PROTECTED]>'
To:'[EMAIL PROTECTED]' was successfully sent using 192.168.5.186"
"Information","mailWorker-3","12/29/03","15:56:34",,"Mail: 'FDA Sounds Alarm
Over Hospital Bed Fires' From:'[EMAIL PROTECTED]' To:'[EMAIL PROTECTED]'
was successfully sent using 192.168.5.186"

The RegEx line I am using is;


ReFindNoCase("(From:')?[.]*[<]?([EMAIL PROTECTED](\.[\w_]+)+)",Message,1,True)
>

The I can get the From Email from both lines, but believe this is definitely
not an optimal RegEx for the "From" part. Anybody have suggestions as to how
to improve. 

Thanks,
Kevin

Sorry if wrong place to post

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




Regular expression help

2004-02-16 Thread Andy Ousterhout
What regular _expression_ would find a "#" followed by any number of blanks,
followed by 2-3 numbers

For example, I want to return 45 from this string:

Testing this string # 45 to 46

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




Re: Regular Expression

2002-07-07 Thread Michael Dinowitz

The expression [^a-z0-9] means match any character that is NOT a-z or 0-9. That will 
return only special characters. You probably want
REFindNoCase("^[- a-z0-9]*$", str)
This will return 1 if the following happens. 
at the start of the string (the carat) look for a dash, a space or any character of 
a-z or 0-9. Match as many of these as you can until the end of the string (the dollar 
sign). 
"New York" - N is the first character at the start of the string. There are only 
letters and a space. The k is the last character in the string. The function will 
return 1 (success).
"Wilkes-Barre" - W is the first character of the string. There are only letters and a 
dash. e is the last character in the string. The function will return 1 (success)
"[EMAIL PROTECTED]" - m is the first character in the string. There is an at 
sign in the string. The function will return 0 (failure). 
There's a tutorial on RegEx at www.houseoffusion.com on the front page.


> I want to do a regular expression validation on a form field (city).
> However, I'm rather unfamiliar with regular expressions.
> 
> How would I rewrite the expression so that it will allow a "-" and a
> space.
> For Example:  "Wilkes-Barre" or "Los Angeles" would be accepted. 
> 
> I can't seem to find anything on CFLib which would allow me to accept
> "-" and "spaces"
> 
> This is what I have so far:
> 
> REFindNoCase("[^a-z0-9]", str)
> 
> 
> Thanks,
> Mark
> 
> 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



regular expression help

2000-09-29 Thread sebastian palmigiani


What am I doing wrong here? What is the regular expression that will extract
a match?

STRING=


REGULAR EXPRESSION=
[[:Alnum:space:]]+', HTML)>

#x#

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Regular Expression help

2000-10-14 Thread CF

I need to find the ">" of the body tag of CFHTTP.FileContent.

So, I need to find the first ">" following  Sun, IRIX, NT, Linux <-
PHP, MySQL, Perl, Cold Fusion,
MS SQL, ASP, SSI, SSL
http://www.newmediaone.net
[EMAIL PROTECTED]
  (303)828-9882

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Regular Expression

2001-10-23 Thread Craig Dudley

Try treating the text a list with a cr/lf delimeter, and then tret each list
item as another list with a delimeter of "=",



http://www.cnn.com/
OtherSrvLev=0w33a
Category=31
">





setvariable( listgetat(i,1,"=") , listgetat(i,2,"=") );





#url#



--

In this case, you now have the variables ID,URL,OtherSrvLev & Category which
can all be used.

HTH
Craig.


-Original Message-
From: Michael Lugassy [mailto:[EMAIL PROTECTED]]
Sent: 19 October 2001 02:50
To: CF-Talk
Subject: Regular Expression


This is not neccesarly have to be done with coldfusion's REReplace but 
anyhow,
I'm trying to come up with a regular expression that will help me turn 
this:

[Object]
ID=2031
URL=http://www.cnn.com/
OtherSrvLev=0w33a
Category=31

Into: http://www.cnn.com/

Overall, I'm trying to find a way to remove EVERYTHING 
(numeric/alpha/special/+New lines)
from "[Object]" over to "URL=", keep everything from URL= to the New 
line and again, remove
everything from OtherSrvLev to the end.
So I will be left with a URL alone.

Anyone?

Michael.



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



RE: Regular Expression

2001-10-23 Thread Ryan Emerle

> I'm trying to come up with a regular expression that will 
> help me turn 
> this:
> 
> [Object]
> ID=2031
> URL=http://www.cnn.com/
> OtherSrvLev=0w33a
> Category=31
> 
> Into: http://www.cnn.com/
> 

You could easily do it with two statements.  I don't think CF allows for
retrieving matches to regular expressions like perl.  Assuming the text
above in in a variable called text, I would just do:


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



RE: Regular Expression

2001-10-24 Thread Alex

what OS?
try
grep URL filename | sed s/URL=//g


On Tue, 23 Oct 2001, Ryan Emerle wrote:

> > I'm trying to come up with a regular expression that will 
> > help me turn 
> > this:
> > 
> > [Object]
> > ID=2031
> > URL=http://www.cnn.com/
> > OtherSrvLev=0w33a
> > Category=31
> > 
> > Into: http://www.cnn.com/
> > 
> 
> You could easily do it with two statements.  I don't think CF allows for
> retrieving matches to regular expressions like perl.  Assuming the text
> above in in a variable called text, I would just do:
> 
> 
> 
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Regular Expression

2001-10-24 Thread Alistair Davidson

Michael

Try

REReplace( string, ".*(URL=)([^[:space:]]+).*", "\2" )

A loose translation -

1) look for any character (.) any number of times(*), followed by
2) the string "URL=", followed by
3) anything other than a space ([^[:space:]]), at least once (+)
4) Replace that whole lot with whatever bit of the string matched part 3.

Hope that helps

Alistair Davidson
Senior Developer
Rocom New Media
www.rocomx.net
~~
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

2001-12-04 Thread Gyrus

> In plain english: I try to find all  tags. After  some characters, then textline.cfm then again some characters.
> The expression MAXHSIZE should not be found in the part between
> textline.cfm to >
>  
> Again: I try to find wrong  calls with a deprecated attribute
> (MAXHSIZE).

Slightly confusing explanation, but assume you want to match those
tags where MAXHSIZE *does* exist, to identify invalid tags. Try

]+textline.cfm[^>]+MAXHSIZE[^>]+>

Not 100% on this, but seems to work with basic test. The core
trick is "[^>]+" (match one or more characters that aren't ">" -
keeps the match inside the tag bounds.

hth,

- Gyrus


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



RE: Regular Expression

2001-12-04 Thread Harry Klein

Thanks for your help,

i think my explanation was really bad.
I would use the same code as you, but my problem is that i want to find
all  tags with no attribute MAXHSIZE.
The attribute is not deprecated but required.

Sorry for the inconveniance.

Harry

> -Original Message-
> From: Gyrus [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 04, 2001 5:10 PM
> To: CF-Talk
> Subject: Re: Regular Expression
> 
> 
> > In plain english: I try to find all  tags. After 
>  > some characters, then textline.cfm then again some characters.
> > The expression MAXHSIZE should not be found in the part between
> > textline.cfm to >
> >  
> > Again: I try to find wrong  calls with a 
> deprecated attribute
> > (MAXHSIZE).
> 
> Slightly confusing explanation, but assume you want to match those
> tags where MAXHSIZE *does* exist, to identify invalid tags. Try
> 
> ]+textline.cfm[^>]+MAXHSIZE[^>]+>
> 
> Not 100% on this, but seems to work with basic test. The core
> trick is "[^>]+" (match one or more characters that aren't ">" -
> keeps the match inside the tag bounds.
> 
> hth,
> 
> - Gyrus
> 
> 
> 
~~
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

2001-12-04 Thread Rick Osborne [Mojo]

I know it looks nasty, but this is what I came up with:

]+textline\.cfm[^>[:space:]]*([[:space:]]+[^M][^A=]?
[^X=]?[^H=]?[^S=]?[^I=]?[^Z=]?[^E=]?[_[:alnum:]]*=("[^"]*"|[^>[:space:]]*))+
[[:space:]]*>

I used the following test cases:








It correctly found the 3 lines that do *not* have the MAXHSIZE attribute.

HTH,
-R


-Original Message-
From: Harry Klein [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, December 04, 2001 12:29
To: CF-Talk
Subject: RE: Regular Expression


Thanks for your help,

i think my explanation was really bad.
I would use the same code as you, but my problem is that i want to find
all  tags with no attribute MAXHSIZE.
The attribute is not deprecated but required.

Sorry for the inconveniance.

Harry

> -Original Message-
> From: Gyrus [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 04, 2001 5:10 PM
> To: CF-Talk
> Subject: Re: Regular Expression
>
>
> > In plain english: I try to find all  tags. After
>  > some characters, then textline.cfm then again some characters.
> > The expression MAXHSIZE should not be found in the part between
> > textline.cfm to >
> >
> > Again: I try to find wrong  calls with a
> deprecated attribute
> > (MAXHSIZE).
>
> Slightly confusing explanation, but assume you want to match those
> tags where MAXHSIZE *does* exist, to identify invalid tags. Try
>
> ]+textline.cfm[^>]+MAXHSIZE[^>]+>
>
> Not 100% on this, but seems to work with basic test. The core
> trick is "[^>]+" (match one or more characters that aren't ">" -
> keeps the match inside the tag bounds.
>
> hth,
>
> - Gyrus
>
>
>

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



Re: Regular Expression

2001-12-04 Thread Don Vawter

Pardon me for being naive but isnt it a lot easier to just combine regex and
regular find trying to match a substring like this?

hasmax="unknown":
st=refindnocase("<[ ]*cfmodule[^>]*>",whatever,1,"yes");
//grab the tag

if (st.pos[1] GT 0){
sub=mid(whatever,st.pos[1],st.len[1]);
   if (findnocase("MAXHSIZE",sub) hasmax="Yes";
   else hasmax="No";
}

If find regex invaluable but sometimes combining with a plain old find makes
my life simpler.


- Original Message -
From: "Rick Osborne [Mojo]" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 10:54 AM
Subject: RE: Regular Expression


> I know it looks nasty, but this is what I came up with:
>
>
]+textline\.cfm[^>[:space:]]*([[:space:]]+[^M][^A=]?
>
[^X=]?[^H=]?[^S=]?[^I=]?[^Z=]?[^E=]?[_[:alnum:]]*=("[^"]*"|[^>[:space:]]*))+
> [[:space:]]*>
>
> I used the following test cases:
>
> 
> 
> 
> 
> 
> 
>
> It correctly found the 3 lines that do *not* have the MAXHSIZE attribute.
>
> HTH,
> -R
>
>
> -Original Message-
> From: Harry Klein [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 04, 2001 12:29
> To: CF-Talk
> Subject: RE: Regular Expression
>
>
> Thanks for your help,
>
> i think my explanation was really bad.
> I would use the same code as you, but my problem is that i want to find
> all  tags with no attribute MAXHSIZE.
> The attribute is not deprecated but required.
>
> Sorry for the inconveniance.
>
> Harry
>
> > -Original Message-
> > From: Gyrus [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, December 04, 2001 5:10 PM
> > To: CF-Talk
> > Subject: Re: Regular Expression
> >
> >
> > > In plain english: I try to find all  tags. After
> >  > > some characters, then textline.cfm then again some characters.
> > > The expression MAXHSIZE should not be found in the part between
> > > textline.cfm to >
> > >
> > > Again: I try to find wrong  calls with a
> > deprecated attribute
> > > (MAXHSIZE).
> >
> > Slightly confusing explanation, but assume you want to match those
> > tags where MAXHSIZE *does* exist, to identify invalid tags. Try
> >
> > ]+textline.cfm[^>]+MAXHSIZE[^>]+>
> >
> > Not 100% on this, but seems to work with basic test. The core
> > trick is "[^>]+" (match one or more characters that aren't ">" -
> > keeps the match inside the tag bounds.
> >
> > hth,
> >
> > - Gyrus
> >
> >
> >
>
> 
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: Regular Expression

2001-12-04 Thread Rick Osborne [Mojo]

Don Vawter wrote:

> Pardon me for being naive but isnt it a lot easier to just
> combine regex and regular find trying to match a substring
> like this?
> [...]
> If find regex invaluable but sometimes combining with a plain
> old find makes my life simpler.

Very, very true.  There's more than one way to do it.  Personally, I'd have
done it with a Perl one-liner and the File::Recurse module.  But, if all you
want to do is paste the regex into CFStudio and have it do a recursive find
then programming isn't really an option.  Of course, the counter point is
that in the time it took for us to respond, Harry could have programmed
something anyway.  Counter counter: other people on the list may have
similar needs, and posting a simple solution (like a single regex) may
enlighten them.

-R

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



Re: Regular Expression

2001-12-04 Thread Don Vawter

True, I hadn't thought about a non programatic solution I guess because if
that were the case I would probably just do a rough regex to get the right
modules and then visually inpect them. Not elegant but takes a lot less time
unless you have lots of them.

- Original Message -
From: "Rick Osborne [Mojo]" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, December 04, 2001 11:38 AM
Subject: RE: Regular Expression


> Don Vawter wrote:
>
> > Pardon me for being naive but isnt it a lot easier to just
> > combine regex and regular find trying to match a substring
> > like this?
> > [...]
> > If find regex invaluable but sometimes combining with a plain
> > old find makes my life simpler.
>
> Very, very true.  There's more than one way to do it.  Personally, I'd
have
> done it with a Perl one-liner and the File::Recurse module.  But, if all
you
> want to do is paste the regex into CFStudio and have it do a recursive
find
> then programming isn't really an option.  Of course, the counter point is
> that in the time it took for us to respond, Harry could have programmed
> something anyway.  Counter counter: other people on the list may have
> similar needs, and posting a simple solution (like a single regex) may
> enlighten them.
>
> -R
>
> 
~~
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



isDate() regular expression

2001-05-30 Thread Ken Beard

I'm trying to make javascript functions that check the format of a string 
that represents a date and time (seperate functions for date & time).  I 
want it to only accept formats that the isDate() coldfusion function would 
accept.  My question is, does anyone know the regular expression that the 
cf function isDate() uses?  If i had that i could just convert it to a 
posix regex and be perfect instead of guessing about/testing exactly what 
isDate() will and won't accept.

thanks in advance,

Ken

-
Ken Beard
Manager, Application Development
Stone Ground Solutions
5100 West Kennedy Blvd, Suite 430
Tampa FL  33602
813.387.1235 voice
866.767.4051 toll free
813.387.1237 fax
www.stoneground.com


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



Regular expression help

2001-06-06 Thread andrew kopelman

Help!
I want to do a find for a text expression, which is to be followed on the 
next line by another text expression.  Only, the amount of whitespace 
(indentation) after the carriage return varies.  Can I do this with regular 
expressions?

In other words the text i am looking for is like this:


  

where the whitespace seems to be throwing off the global find.

Thanks in advance.
Andrew
~~
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: Regular Expression

2001-06-06 Thread Douglas Jordon

Did the trick. Thanks. Also noticed I was  attempting to replace multiple spaces with 
nothing. Might of caught that
if my RE had worked

Dick Applebaum wrote:

> Try
>
>
>
> At 4:58 PM -0400 6/6/01, Douglas Jordon wrote:
> >Hi,
> >
> >I need a Regular Expression to remove muliple spaces within a string but
> >leave single spaces. I poked around and came up with:
> >
> >  
> >
> >Not working. What am I doing wrong?
> >
> >TIA,
> >
> >Douglas Jordon
> >
> >
> >
>
~~
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: Regular Expression

2001-06-06 Thread Dick Applebaum

Try

   


At 4:58 PM -0400 6/6/01, Douglas Jordon wrote:
>Hi,
>
>I need a Regular Expression to remove muliple spaces within a string but
>leave single spaces. I poked around and came up with:
>
>  
>
>Not working. What am I doing wrong?
>
>TIA,
>
>Douglas Jordon
>
>
>
~~
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



Regular Expression Help

2001-02-08 Thread Joe Sheble aka Wizaerd

I have some text, and in this text there may or may not be URLs.  Some of 
these URLs may already be inside of an A HREF tag while others may not.  I 
need a regular expression that will find all the URLs (starting with 
http:// or www. or email addresses) that are not already inside of HREF 
tags and make them into valid HREF tags while leaving the URLs already 
inside a HREF tag alone...

Can anybody give some suggestions about this?

Joseph E. Sheble
[EMAIL PROTECTED]

Wizaerd's Realm
http://www.wizaerd.com


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



Regular Expression Help?

2001-02-22 Thread Jamie Jackson

Hi, I'm trying to globally replace (with CF Studio) application
variables with request variables in several sites. I can't figure out
exactly how, as I don't know how to negate strings (as opposed to just
character classes).

I want to change application.variableX to request.variableX, but I
don't want to change "application. ", "application.", or
references to "application.cfm"

Could you please help?

Here is just one of may seriously flawed attempts at a match:
(application\.)([^ ]|[^cC][^fF][^mM]|[^<])

Thanks,
Jamie

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



Regular expression help

2001-03-15 Thread Jeff Britts

Help for a regular expression idiot.
 
I'm looking to remove all the characters between two tags:
 
example 
from:  asldfj lskdf jaskldf jklasdf jlaskdfj lasdkf 
 
to: 
 
 
(removing the tags themselves would be a plus)
 
 
 


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



Regular expression Help

2001-03-23 Thread Mallory Woods

Greetings All,

I am in the process of developing a small headache with Regular
Expressions...

I have looked at all of the examples I could find on the archives of this
mailing list and other web
pages but I still just don't get it.. I think I will pickup the O'Reilly
book that I have seen at another job before
on regular expressions but for now I am asking the list for help..

What I am trying to do is parse through an HTML source page an look for a
specfic string.. for example..



I would like to grab everything from this string from " to GMT"

Thanks in Advance...

Mallory Woods



This email and any files transmitted with it are confidential and are intended solely 
for the use of the individual or entity to which they are addressed.  If you are not 
the intended recipient or the person responsible for delivering the email to the 
intended recipient, be advised that you have received this email and any such files in 
error and that any use, dissemination, forwarding, printing or copying of this email 
and/or any such files is strictly prohibited.  If you have received this email in 
error please immediately notify [EMAIL PROTECTED] and destroy the original message 
and any such files.

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



Regular Expression Help

2001-07-26 Thread John Barleycorn

Hello, i'm having some trouble using regular expressions. i read the book 
and looked up examples, but unfortunately, i can't seem to solve my problem. 
i've written code that checks to see if there is either a letter or a 
punctuation mark in a string, but it's not returning results properly. 
here's the code:



and my return value is always zero. can anyone tell me how this should be 
written so that i works? thanks for your help.

oh, forgot one thing, i also need to check to see if there are any spaces 
inside the string. that's something i also don't know how to do. thanks a 
lot.
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



Regular expression help

2002-01-16 Thread Douglas Brown

I have a field that will be populated with a first name and a last name, 
what I want to do is make sure that the first letter of the first & last 
name is uppercase and that all others are lower case. Could someone help 
in a reg expression that will do this?





There are two major products that come out of Berkeley: LSD and [Unix] 
BSD. We don't believe this to be a coincidence.



Doug Brown
__
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



Regular Expression Help

2002-03-01 Thread Jared Stark

Hello all.  I am trying to write a simple search engine, and would like 
to replace certain commonly used prepositions from the search string 
such as 'a','the','for', etc...

I have an array of the prepositions that I would like to remove, however 
the problem I have is that it is removing them when they are subsets of 
other words, for example 'them' would become 'm' when removing 'the', 
'bag' would become 'bg' when removing 'a', etc...  

I'm not an expert at regular expression, but I'm assuming it is possible 
to remove only those instances where the prepositions are stand-alone 
and not subsets of other words.  Could someone render me some 
assistance?

Much thanks,
Jared

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

2004-05-13 Thread Craig Dudley
Try treating the text a list with a cr/lf delimeter, and then tret each list
item as another list with a delimeter of "=",




OtherSrvLev=0w33a
Category=31
">





setvariable( listgetat(i,1,"=") , listgetat(i,2,"=") );





	



--

In this case, you now have the variables ID,URL,OtherSrvLev & Category which
can all be used.

HTH
Craig.

-Original Message-
From: Michael Lugassy [mailto:[EMAIL PROTECTED]
Sent: 19 October 2001 02:50
To: CF-Talk
Subject: Regular _expression_

This is not neccesarly have to be done with coldfusion's REReplace but 
anyhow,
I'm trying to come up with a regular _expression_ that will help me turn 
this:

[Object]
ID=2031
URL="">
OtherSrvLev=0w33a
Category=31

Into: http://www.cnn.com/

Overall, I'm trying to find a way to remove EVERYTHING 
(numeric/alpha/special/+New lines)
from "[Object]" over to "URL="" keep everything from URL= "" the New 
line and again, remove
everything from OtherSrvLev to the end.
So I will be left with a URL alone.

Anyone?

Michael.

~~
Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[EMAIL PROTECTED]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Regular Expression Help

2004-05-17 Thread Ian
I'm trying to parse a string and pluck a bit of text, but my regex
isn't working :( Here's a sample string:

(msg:"My Message Here"; content:"My Content Here";)

I want to return My Message Here.

And here's my regex:

refindnocase("msg:[[:print:]]+;", mystring)

I'm using print as mystring may contain any printable characters.

This returns 0 as the position. Any ideas?

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




Regular Expression Help

2003-09-26 Thread kelly
 Ok I suck at reg expressions.   Basically I have some data and within the data there is some stuff I want to remove.  Example text text blah">http://www.blah.com">blah blah blah blah text text Ok basically I want to remove everything from  although it will be different on every line. So I need code that will look for  href and the ending of  and remove all text inbetween (including the  href and  of course.) leaving just text text text text.  (note text is simply an example the verbiage will differ everytime, the only consistency is the  SUggestions? Kelly
 [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]



Regular Expression Help

2004-11-05 Thread Daniel Farmer
I'm searching a long string and looking for the value

http://www.cfhosting.net

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


RE: Regular Expression

2004-12-13 Thread Jim Davis
> -Original Message-
> From: vishnu prasad [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 13, 2004 12:53 AM
> To: CF-Talk
> Subject: Regular Expression
> 
> Hi all
> need an help in requlaer expression
> i have a string like this
> 'this is samp'le data to in'sert'
> 
> now i need to replace the like this usign regular expression
> 'this is samp''le data to in''sert'

I don't think you need regular expressions (mush as I love the little
beasties).

If the string is not single quoted as in:

this is samp'le data to in'sert

you can just use the "replace" function like so:




If the string IS quoted as in:

'this is samp'le data to in'sert'

you can just add the following:





In other words, replace all single quotes with two single quotes (the
Replace() function), then give me the entire string minus the first and last
characters (the Mid() function).

This will create double single quotes at the beginning and end, then
immediately eliminate them.

You might also want to Trim() the strings before processing them if you're
unsure of the input.

Hope this helps.

Jim Davis



~|
Special thanks to the CF Community Suite Silver Sponsor - RUWebby
http://www.ruwebby.com

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


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 Help

2002-12-06 Thread Joshua Miller
 ReReplaceNoCase(string,"[[:punct:]]","_","ALL")

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:31 PM
To: CF-Talk
Subject: Regular Expression Help


I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the
string as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
space, all with the _ character.

Thanks
-- Jeff


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

2002-12-06 Thread Joshua Miller
Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:31 PM
To: CF-Talk
Subject: Regular Expression Help


I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the
string as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
space, all with the _ character.

Thanks
-- Jeff


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



RE: Regular Expression Help

2002-12-06 Thread Mike Townend
Something like



HTH



-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 6, 2002 17:31
To: CF-Talk
Subject: Regular Expression Help


I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the string
as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank space,
all with the _ character.

Thanks
-- Jeff


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

2002-12-06 Thread Raymond Camden
It's as simple as:

\.\?/","_","all")>

Notice I had to escape out the # and " for CF and a few character that
regex use like . and *. It's possible I may have missed one though.

===
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: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 11:31 AM
> To: CF-Talk
> Subject: Regular Expression Help
> 
> 
> I am trying to use a regular expression to change all 
> possible special characters in a string to underscores 
> because I am trying to use the string as a variable name.
> 
> Regular expressions are not my specialty and I am running 
> into problems using some characters in my reReplace function.
> 
> Could somebody offer some suggestions on making this work?
> 
> I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a 
> blank space, all with the _ character.
> 
> Thanks
> -- Jeff
> 
> 
~|
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



RE: Regular Expression Help

2002-12-06 Thread Jeff D. Chastain
That was what I was looking for, I just had not found it yet.

Thanks

-Original Message-
From: Joshua Miller [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 11:42 AM
To: CF-Talk
Subject: RE: Regular Expression Help


 ReReplaceNoCase(string,"[[:punct:]]","_","ALL")

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net [EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:31 PM
To: CF-Talk
Subject: Regular Expression Help


I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the
string as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
space, all with the _ character.

Thanks
-- Jeff



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

2002-12-06 Thread Raymond Camden
Jeff, definetly use Josh's code - just make sure that the chars you want
match the [[:punct:]] char class - from the docs:

Matches any punctuation character, that is, one of ! ' # S % & ` ( ) * +
, - . / : ; < = > ? @ [ / ] ^ _ { | } ~

===
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: Joshua Miller [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
> 
> Joshua Miller
> Head Programmer / IT Manager
> Garrison Enterprises Inc.
> www.garrisonenterprises.net [EMAIL PROTECTED]
> (704) 569-9044 ext. 254
>  

> 
> 
> -Original Message-
> From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 12:31 PM
> To: CF-Talk
> Subject: Regular Expression Help
> 
> 
> I am trying to use a regular expression to change all 
> possible special characters in a string to underscores 
> because I am trying to use the string as a variable name.
> 
> Regular expressions are not my specialty and I am running 
> into problems using some characters in my reReplace function.
> 
> Could somebody offer some suggestions on making this work?
> 
> I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a 
> blank space, all with the _ character.
> 
> Thanks
> -- Jeff
> 

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

2002-12-06 Thread Jeff D. Chastain
How do you not replace a non-existent space before and after the string?
Everything else works great.

Thanks

-Original Message-
From: Joshua Miller [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 11:43 AM
To: CF-Talk
Subject: RE: Regular Expression Help


Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net [EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:31 PM
To: CF-Talk
Subject: Regular Expression Help


I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the
string as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
space, all with the _ character.

Thanks
-- Jeff



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

2002-12-06 Thread Teel, C. Doug
I think you accidentally doubled the pipes between the punct and space.   It
should be:
[[:punct:]]|[[:space:]]

Thanks,
Doug
-Original Message-
From: Joshua Miller [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 11:43 AM
To: CF-Talk
Subject: RE: Regular Expression Help


Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:31 PM
To: CF-Talk
Subject: Regular Expression Help


I am trying to use a regular expression to change all possible special
characters in a string to underscores because I am trying to use the
string as a variable name.

Regular expressions are not my specialty and I am running into problems
using some characters in my reReplace function.

Could somebody offer some suggestions on making this work?

I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
space, all with the _ character.

Thanks
-- Jeff



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

2002-12-06 Thread Rob Rohan
lastly, you could think backwards [^A-Za-z0-9]

Rob

http://treebeard.sourceforge.net
http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:47 AM
To: CF-Talk
Subject: RE: Regular Expression Help


Jeff, definetly use Josh's code - just make sure that the chars you want
match the [[:punct:]] char class - from the docs:

Matches any punctuation character, that is, one of ! ' # S % & ` ( ) * +
, - . / : ; < = > ? @ [ / ] ^ _ { | } ~

===
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: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
>
>
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
>
> Joshua Miller
> Head Programmer / IT Manager
> Garrison Enterprises Inc.
> www.garrisonenterprises.net [EMAIL PROTECTED]
> (704) 569-9044 ext. 254
>

>
>
> -Original Message-
> From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 12:31 PM
> To: CF-Talk
> Subject: Regular Expression Help
>
>
> I am trying to use a regular expression to change all
> possible special characters in a string to underscores
> because I am trying to use the string as a variable name.
>
> Regular expressions are not my specialty and I am running
> into problems using some characters in my reReplace function.
>
> Could somebody offer some suggestions on making this work?
>
> I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a
> blank space, all with the _ character.
>
> Thanks
> -- Jeff
>


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

2002-12-06 Thread Raymond Camden
What is a non-existent space? How could a regex remove a character not
there?

===
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: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 11:53 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> How do you not replace a non-existent space before and after 
> the string? Everything else works great.
> 
> Thanks
> 
> -Original Message-
> From: Joshua Miller [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
> 

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

2002-12-06 Thread Joshua Miller
Yeah, that's probably the safest method - anything that's NOT a letter
or number. Good call.

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Rob Rohan [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:54 PM
To: CF-Talk
Subject: RE: Regular Expression Help


lastly, you could think backwards [^A-Za-z0-9]

Rob

http://treebeard.sourceforge.net http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:47 AM
To: CF-Talk
Subject: RE: Regular Expression Help


Jeff, definetly use Josh's code - just make sure that the chars you want
match the [[:punct:]] char class - from the docs:

Matches any punctuation character, that is, one of ! ' # S % & ` ( ) * +
, - . / : ; < = > ? @ [ / ] ^ _ { | } ~

===
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: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
>
>
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
>
> Joshua Miller
> Head Programmer / IT Manager
> Garrison Enterprises Inc.
> www.garrisonenterprises.net [EMAIL PROTECTED]
> (704) 569-9044 ext. 254
>

>
>
> -Original Message-
> From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 12:31 PM
> To: CF-Talk
> Subject: Regular Expression Help
>
>
> I am trying to use a regular expression to change all possible special

> characters in a string to underscores because I am trying to use the 
> string as a variable name.
>
> Regular expressions are not my specialty and I am running into 
> problems using some characters in my reReplace function.
>
> Could somebody offer some suggestions on making this work?
>
> I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank 
> space, all with the _ character.
>
> Thanks
> -- Jeff
>



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

2002-12-06 Thread Jeff D. Chastain
When I use your before mention snippet, I am getting an underscore
character tacked onto the beginning and ending of each word.  There is
no space or any other character their, but after executing the regex
statement, I have underscores before and after.

[[:punct:]]|[[:space:]] on 'some phrase' returns '_some_phrase_' instead
of 'some_phrase' which is what I was looking for.

Thanks

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 11:54 AM
To: CF-Talk
Subject: RE: Regular Expression Help


What is a non-existent space? How could a regex remove a character not
there?

===
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: Jeff D. Chastain [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:53 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> How do you not replace a non-existent space before and after
> the string? Everything else works great.
> 
> Thanks
> 
> -Original Message-
> From: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
> 


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

2002-12-06 Thread Jeff D. Chastain
Yep, this is probably the safest bet and produces the expected result.

Thanks


-Original Message-
From: Rob Rohan [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 11:54 AM
To: CF-Talk
Subject: RE: Regular Expression Help


lastly, you could think backwards [^A-Za-z0-9]

Rob

http://treebeard.sourceforge.net http://ruinworld.sourceforge.net
Scientia Est Potentia

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 06, 2002 9:47 AM
To: CF-Talk
Subject: RE: Regular Expression Help


Jeff, definetly use Josh's code - just make sure that the chars you want
match the [[:punct:]] char class - from the docs:

Matches any punctuation character, that is, one of ! ' # S % & ` ( ) * +
, - . / : ; < = > ? @ [ / ] ^ _ { | } ~

===
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: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
>
>
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
>
> Joshua Miller
> Head Programmer / IT Manager
> Garrison Enterprises Inc.
> www.garrisonenterprises.net [EMAIL PROTECTED]
> (704) 569-9044 ext. 254
>

>
>
> -Original Message-
> From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 12:31 PM
> To: CF-Talk
> Subject: Regular Expression Help
>
>
> I am trying to use a regular expression to change all possible special

> characters in a string to underscores because I am trying to use the 
> string as a variable name.
>
> Regular expressions are not my specialty and I am running into 
> problems using some characters in my reReplace function.
>
> Could somebody offer some suggestions on making this work?
>
> I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank 
> space, all with the _ character.
>
> Thanks
> -- Jeff
>



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

2002-12-06 Thread Joshua Miller
Did you TRIM the variable first? That may help ... Perhaps there's
whitespace surrounding the text.

Try: ReReplaceNoCase(trim(variable),"[^A-Za-z0-9]","_","ALL")

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net
[EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


-Original Message-
From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 1:03 PM
To: CF-Talk
Subject: RE: Regular Expression Help


When I use your before mention snippet, I am getting an underscore
character tacked onto the beginning and ending of each word.  There is
no space or any other character their, but after executing the regex
statement, I have underscores before and after.

[[:punct:]]|[[:space:]] on 'some phrase' returns '_some_phrase_' instead
of 'some_phrase' which is what I was looking for.

Thanks

-Original Message-
From: Raymond Camden [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 11:54 AM
To: CF-Talk
Subject: RE: Regular Expression Help


What is a non-existent space? How could a regex remove a character not
there?

===
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: Jeff D. Chastain [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:53 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> How do you not replace a non-existent space before and after the 
> string? Everything else works great.
> 
> Thanks
> 
> -Original Message-
> From: Joshua Miller [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 06, 2002 11:43 AM
> To: CF-Talk
> Subject: RE: Regular Expression Help
> 
> 
> Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
> 



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

2002-12-06 Thread Jeff D. Chastain
reReplace(string, "[^A-Za-z0-9]", "_", "ALL") on 'some phrase' returns
'some_phrase' as expected.

reReplace(string, "[[:punct:]]|[[:space:]]", "_" "ALL") on 'some phrase'
returns '_some_phrase_' which was not expected.  The string 'some
phrase' really is just that without any extra spaces.

Either way, the first method works just fine and is probably safer.


-Original Message-
From: Joshua Miller [mailto:[EMAIL PROTECTED]] 
Sent: Friday, December 06, 2002 12:30 PM
To: CF-Talk
Subject: RE: Regular Expression Help


Did you TRIM the variable first? That may help ... Perhaps there's
whitespace surrounding the text.

Try: ReReplaceNoCase(trim(variable),"[^A-Za-z0-9]","_","ALL")

Joshua Miller
Head Programmer / IT Manager
Garrison Enterprises Inc.
www.garrisonenterprises.net [EMAIL PROTECTED]
(704) 569-9044 ext. 254
 

*
Any views expressed in this message are those of the individual sender,
except where the sender states them to be the views of 
Garrison Enterprises Inc.
 
This e-mail is intended only for the individual or entity to which it is
addressed and contains information that is private and confidential. If
you are not the intended recipient you are hereby notified that any
dissemination, distribution or copying is strictly prohibited. If you 
have received this e-mail in error please delete it immediately and
advise us by return e-mail to [EMAIL PROTECTED]

*


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

2002-12-06 Thread Ben Doom
I'd use
[[:punct:] ]
as the class if you only need to check spaces -- if you need vertical tabs,
carriage returns, tabs, etc. use
[[:punct:][:space:]]
which should give you something like
newstring = rereplace(string, "[[:punct:][:space:]]", "_", "all");

Of course, it might be easier (as Rob suggested) to think about what
characters you want to allow instead of disallow:

newstring = rereplace(string, "[^a-zA-Z0-9_]", "_", "all");

would only keep letters, numbers, and underscores.

As always, the plug for the RegEx list:
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: Joshua Miller [mailto:[EMAIL PROTECTED]]
: Sent: Friday, December 06, 2002 12:43 PM
: To: CF-Talk
: Subject: RE: Regular Expression Help
:
:
: Oh, forgot the space  use "[[:punct:]]||[[:space:]]" as the RegEX
:
: Joshua Miller
: Head Programmer / IT Manager
: Garrison Enterprises Inc.
: www.garrisonenterprises.net
: [EMAIL PROTECTED]
: (704) 569-9044 ext. 254
:
: 
: *
: Any views expressed in this message are those of the individual sender,
: except where the sender states them to be the views of
: Garrison Enterprises Inc.
:
: This e-mail is intended only for the individual or entity to which it is
: addressed and contains information that is private and confidential. If
: you are not the intended recipient you are hereby notified that any
: dissemination, distribution or copying is strictly prohibited. If you
: have received this e-mail in error please delete it immediately and
: advise us by return e-mail to [EMAIL PROTECTED]
: 
: *
:
:
: -Original Message-
: From: Jeff D. Chastain [mailto:[EMAIL PROTECTED]]
: Sent: Friday, December 06, 2002 12:31 PM
: To: CF-Talk
: Subject: Regular Expression Help
:
:
: I am trying to use a regular expression to change all possible special
: characters in a string to underscores because I am trying to use the
: string as a variable name.
:
: Regular expressions are not my specialty and I am running into problems
: using some characters in my reReplace function.
:
: Could somebody offer some suggestions on making this work?
:
: I am needing to replace !@#$%^&*()-+={[}]|\:;"'<,>.?/ plus a blank
: space, all with the _ character.
:
: Thanks
: -- Jeff
:
:
: 
~|
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



Regular Expression cfform validation

2002-09-19 Thread Bryan F. Hogan

I want to make sure that no special characters are entered into my form
before submitting.

What is the syntax for the regular expression to put within the pattern
attribute of the form tag.



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

2003-01-23 Thread Ryan Emerle
Im not sure how this relates to regular expressions.. but you could use this script 
nonetheless:


function asciiConv(letter) {
return "&###asc(letter)#";
}


HTH 
-Ryan

-Original Message-
From: Mark Leder [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 23, 2003 9:27 AM
To: CF-Talk
Subject: SOT: Regular Expression


Are there any resources / tutorials / tools / Cftags / UDF / CFC's /
functions that would allow a plain-text string to be converted to ASCII HTML
code? (ie, A = A and so on)

Thanks, Mark 



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

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




RE: regular expression help

2002-07-09 Thread Tangorre, Michael

Mark,

I am fairly new to RegEx, but I can tell you we did this on our University's site when 
I was in college.
We allowed the different departments to submit formatted text using an assortment of 
HTML tags that we specified.
We used RegEx to do this, and did not notice a performace hit at all.

For what that's worth...

Mike


-Original Message-
From: Mark Warrick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 09, 2002 3:50 PM
To: CF-Talk
Subject: regular expression help


Hello,

I've got a form field in which I want to allow people to enter HTML tags
(formatted stories for the web), but only a limited set of them such as
heading, bold, and italic tags so that they don't mess up the overall
formatting of the page.

What I'd like to do is automatically strip out any other HTML tag (or
JavaScript, CSS, DHTML, etc.) from the submission but leave the safe tags.
I'm thinking that using a regular expression string to do this would be the
way to go, however there is something to consider about that idea.  The data
ends up in an NTEXT field in the SQL database which is capable of storing a
lot of data and I suspect people might be typing as much as a few pages of
text into this field.  So I'm worried that a regular expression might take
too long to parse through all the entered text.

Perhaps I'm missing something obvious here.  Anyone have any suggestions?

---mark


Mark Warrick ([EMAIL PROTECTED])
Founder, Fusioneers.com / CTO, ZapConnect.com
Phone: 714-547-5386 / 714-667-0203 / Efax: 801-730-7289
http://www.warrick.net / http://www.fusioneers.com
http://www.zapconnect.com
ICQ: 125160 AIM: markwarric Yahoo: Serengeti




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



Re: regular expression help

2002-07-09 Thread Michael Dinowitz

If you have a limited range of accepted tags then the following will probably be your 
best bet. 
1. find all of the tags you want to allow. 
2. replace their brackets with some non-standard character (like a yen symbol). 
3. remove all other tags that exist.
4. replace your yen with brackets again.



> Hello,
> 
> I've got a form field in which I want to allow people to enter HTML tags
> (formatted stories for the web), but only a limited set of them such as
> heading, bold, and italic tags so that they don't mess up the overall
> formatting of the page.
> 
> What I'd like to do is automatically strip out any other HTML tag (or
> JavaScript, CSS, DHTML, etc.) from the submission but leave the safe tags.
> I'm thinking that using a regular expression string to do this would be the
> way to go, however there is something to consider about that idea.  The data
> ends up in an NTEXT field in the SQL database which is capable of storing a
> lot of data and I suspect people might be typing as much as a few pages of
> text into this field.  So I'm worried that a regular expression might take
> too long to parse through all the entered text.
> 
> Perhaps I'm missing something obvious here.  Anyone have any suggestions?
> 
> ---mark
> 
> 
> Mark Warrick ([EMAIL PROTECTED])
> Founder, Fusioneers.com / CTO, ZapConnect.com
> Phone: 714-547-5386 / 714-667-0203 / Efax: 801-730-7289
> http://www.warrick.net / http://www.fusioneers.com
> http://www.zapconnect.com
> ICQ: 125160 AIM: markwarric Yahoo: Serengeti
> 
> 
> 
> 
__
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: 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 Help

2000-06-22 Thread Todd Ashworth

Application.cfm files are great for saving on coding and site management and
stuff, but when you have sub folders that need their own Application.cfm
files, they become less convenient as you have to make sure to include any
needed code from the Application.cfms above them.  Today, I had a (probably
unoriginal) idea.  Is it possible to  the 'root' Application.cfm
into the sub Application.cfms?  This would save me from having to edit all
of the sub ones every time I made a change to the root one.  If this is
technicly possible, is there any reason this shouldn't be done?

Thanks,

Todd

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Regular Expression Help

2000-06-22 Thread Chris Montgomery


>-Original Message-
>From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, June 22, 2000 9:11 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Regular Expression Help
>

>Is it possible to  the 'root' Application.cfm
>into the sub Application.cfms?

Works ok for me.

>This would save me from having to edit all
>of the sub ones every time I made a change to the root one.  If this is
>technicly possible, is there any reason this shouldn't be done?
>
>Thanks,
>
>Todd

I'd be interested in the answer to this last question, too.

Chris Montgomery   [EMAIL PROTECTED]
:: Web development/Consulting  http://www.astutia.com ::
:: Allaire Consulting Partner/ NetObjects Reseller::
:: 210-490-3249/888-745-7603   Fax 210-490-4692   ::
:: Find a Job in San Antonio   http://www.sajobnet.com::

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Regular Expression Help

2000-06-23 Thread Aidan Whitehall

> Application.cfm files are great for saving on coding and site 
> management and
> stuff, but when you have sub folders that need their own 
> Application.cfm
> files, they become less convenient as you have to make sure 
> to include any
> needed code from the Application.cfms above them.  Today, I 
> had a (probably
> unoriginal) idea.  Is it possible to  the 'root' 
> Application.cfm
> into the sub Application.cfms?  This would save me from 
> having to edit all
> of the sub ones every time I made a change to the root one.  
> If this is
> technicly possible, is there any reason this shouldn't be done?


If you have a ColdFusion mapping set up for the website, you could just





-- 
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd
Advanced Web Solutions & Services

http://www.netshopperuk.com/
Telephone +44 (01744) 648650
Fax +44 (01744) 648651
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Regular Expression Help

2000-06-23 Thread Steve Bernard

What you describe is one of the tenants of Fusebox, www.fusebox.org. In that
case the global app code is included in the local app code for each of the
sub folders. What you describe achieves much the same effect by a different
name.

Steve

-Original Message-
From: Todd Ashworth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 22, 2000 10:11 PM
To: [EMAIL PROTECTED]
Subject: Re: Regular Expression Help


Application.cfm files are great for saving on coding and site management and
stuff, but when you have sub folders that need their own Application.cfm
files, they become less convenient as you have to make sure to include any
needed code from the Application.cfms above them.  Today, I had a (probably
unoriginal) idea.  Is it possible to  the 'root' Application.cfm
into the sub Application.cfms?  This would save me from having to edit all
of the sub ones every time I made a change to the root one.  If this is
technicly possible, is there any reason this shouldn't be done?

Thanks,

Todd

--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Regular Expression Help

2000-06-29 Thread Andrew Scott

You need the chr(13) & chr(10) characters to be replaced with 


-Original Message-
From: Nicole R. Lane [mailto:[EMAIL PROTECTED]]
Sent: Friday, 23 June 2000 2:54 PM
To: [EMAIL PROTECTED]
Subject: Regular Expression Help


Hi:

I'm trying to replace the new line character with  for every line
between the ".nf" and ".fi" tags.


Sample Text:
 -
text

.nf
Prepared by:
Richard E. Wallace
Bureau of Audits

Reviewed by:
C. Joseph Meisinger
Fiscal Office
.fi

more text

-

I was thinking this, but it doesn't work:

", "ALL")>

Any ideas?

Thanks,Nicole


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.


--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: OT: Regular Expression

2004-01-03 Thread Jochem van Dieten
Kevin Marino wrote:
> 
> "Information","scheduler-0","12/29/03","15:41:19",,"Mail: 'Report Examines
> U.S. Long-Term Care Spending' From:'John Noone <[EMAIL PROTECTED]>'
> To:'[EMAIL PROTECTED]' was successfully sent using 192.168.5.186"
> "Information","mailWorker-3","12/29/03","15:56:34",,"Mail: 'FDA Sounds Alarm
> Over Hospital Bed Fires' From:'[EMAIL PROTECTED]' To:'[EMAIL PROTECTED]'
> was successfully sent using 192.168.5.186"
> 
> The RegEx line I am using is;
> 
> 
> ReFindNoCase("(From:')?[.]*[<]?([EMAIL PROTECTED](\.[\w_]+)+)",Message,1,True)
> 
> The I can get the From Email from both lines, but believe this is definitely
> not an optimal RegEx for the "From" part. Anybody have suggestions as to how
> to improve. 

First, treat the log file as a Chr(13) delimited list, that will 
break the log into individual messages. Then, if you only use 
canonical email addresses, it should be as simple as:



Jochem

-- 
I don't get it
immigrants don't work
and steal our jobs
 - Loesje
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: OT: Regular Expression

2004-01-05 Thread Kevin Marino
-Original Message-
From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 03, 2004 2:42 PM
To: CF-Talk
Subject: Re: OT: Regular _expression_

Kevin Marino wrote:
> 
> "Information","scheduler-0","12/29/03","15:41:19",,"Mail: 'Report Examines
> U.S. Long-Term Care Spending' From:'John Noone <[EMAIL PROTECTED]>'
> To:'[EMAIL PROTECTED]' was successfully sent using 192.168.5.186"
> "Information","mailWorker-3","12/29/03","15:56:34",,"Mail: 'FDA Sounds
Alarm
> Over Hospital Bed Fires' From:'[EMAIL PROTECTED]'
To:'[EMAIL PROTECTED]'
> was successfully sent using 192.168.5.186"
> 
> The RegEx line I am using is;
> 
> 
>
ReFindNoCase("(From:')?[.]*[<]?([EMAIL PROTECTED](\.[\w_]+)+)",Message,1,True)
> 
> The I can get the From Email from both lines, but believe this is
definitely
> not an optimal RegEx for the "From" part. Anybody have suggestions as to
how
> to improve. 

 > First, treat the log file as a Chr(13) delimited list, that will 
 > break the log into individual messages. Then, if you only use 
 > canonical email addresses, it should be as simple as:

 > 

 > Jochem

 
Jochem,

 
that helps,  I now get "John Noone <[EMAIL PROTECTED]>"  but I also need to
extract the actual email address from between the "<>" also they are
optional.

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




Re: OT: Regular Expression

2004-01-05 Thread Jochem van Dieten
Kevin Marino wrote:
> From: Jochem van Dieten [mailto:[EMAIL PROTECTED] 

>>>"Information","scheduler-0","12/29/03","15:41:19",,"Mail: 'Report Examines
>>>U.S. Long-Term Care Spending' From:'John Noone <[EMAIL PROTECTED]>'
>>>To:'[EMAIL PROTECTED]' was successfully sent using 192.168.5.186"
>>>"Information","mailWorker-3","12/29/03","15:56:34",,"Mail: 'FDA Sounds
>>>Alarm
>>>Over Hospital Bed Fires' From:'[EMAIL PROTECTED]'
>>>To:'[EMAIL PROTECTED]'
>>>was successfully sent using 192.168.5.186"

>> First, treat the log file as a Chr(13) delimited list, that will 
>> break the log into individual messages. Then, if you only use 
>> canonical email addresses, it should be as simple as:
>> 
>> 
>  
> that helps,  I now get "John Noone <[EMAIL PROTECTED]>"  but I also need to
> extract the actual email address from between the "<>" also they are
> optional.


   
   ]*)>.*$","\1")>


Jochem

-- 
I don't get it
immigrants don't work
and steal our jobs
 - Loesje
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Regular expression help

2004-02-16 Thread Matthew Walker
How about this?





#mid(myString, result.pos[2],
result.len[2])#



-Original Message-
From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, 17 February 2004 11:05 a.m.
To: CF-Talk
Subject: Regular _expression_ help

What regular _expression_ would find a "#" followed by any number of blanks,
followed by 2-3 numbers

For example, I want to return 45 from this string:

Testing this string # 45 to 46

Andy

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




RE: Regular expression help

2004-02-17 Thread Pascal Peters

regexp = "##[[:space:]]*([0-9]{2-3})";
stTmp = REFindNoCase(regexp,str,1,true);
if(stTmp.pos[1])
	result = Mid(str,stTmp.pos[2],stTmp.len[2]);
else
	result = "";


If you need to find all, you do it in a loop: 


regexp = "##[[:space:]]*([0-9]{2-3})";
results = ArrayNew(1);
start = 1;
while(true){
	stTmp = REFindNoCase(regexp,str,start,true);
	if(stTmp.pos[1]){
		ArrayAppend(results,Mid(str,stTmp.pos[2],stTmp.len[2]));
		start = stTmp.pos[1] + stTmp.len[1];
	}
	else break;
}


Probably you want to make sure that the character after the 2-3 digits
is not a digit. If so, modify the regexp to
regexp = "##[[:space:]]*([0-9]{2-3})([^0-9]|$)";

On CFMX you could use negative lookahead:
regexp = "##\s*(\d{2,3})(?!\d)";

Pascal

> -Original Message-
> From: Andy Ousterhout [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 17 februari 2004 0:05
> To: CF-Talk
> Subject: Regular _expression_ help
> 
> What regular _expression_ would find a "#" followed by any 
> number of blanks, followed by 2-3 numbers
> 
> For example, I want to return 45 from this string:
> 
> Testing this string # 45 to 46
> 
> Andy
> 
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: regular expression help

2000-09-29 Thread Hayes, David

Well, you've got some characters other than :Alnum: and :space:.  You've got
:punct: in there also.

-Original Message-
From: sebastian palmigiani [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 1:29 PM
To: CF-Talk
Subject: regular expression help



What am I doing wrong here? What is the regular expression that will extract
a match?

STRING=====


====REGULAR EXPRESSION=
[[:Alnum:space:]]+', HTML)>

#x#


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: regular expression help

2000-09-29 Thread Mark Johnson

I don't know exactly what you are trying to find in the string.  But this
should match the contents of the first table row.

[^<]*', HTML)>

or if you just want the contents of everything between that cell.

#ReReplace(HTML, '([^<]*)', \1)#

However we really need to know what you want from the string.

Mark Johnson
---
Senior Cold Fusion Developer
Cardinal Communications


-Original Message-
From: sebastian palmigiani [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 29, 2000 7:29 PM
To: CF-Talk
Subject: regular expression help



What am I doing wrong here? What is the regular expression that will extract
a match?

STRING=


REGULAR EXPRESSION=
[[:Alnum:space:]]+', HTML)>

#x#


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



RE: Regular Expression help

2000-10-15 Thread Matthew Walker

> I need to find the ">" of the body tag of CFHTTP.FileContent.
> So, I need to find the first ">" following ]*)(>)", TheString, 1, "TRUE")>


--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: Regular Expression help

2000-10-15 Thread Dick Applebaum

Try:

   

   
   " , CFHTTP.FileContent, bodyBegin)>

   
   bodyBegin.|#bodyBegin#|
   bodyEnd...|#bodyEnd#|
   


HTH

Dick

At 12:28 AM -0600 10/15/00, CF wrote:
>I need to find the ">" of the body tag of CFHTTP.FileContent.
>
>So, I need to find the first ">" following 
>Can anyone help with this?
>
>Thanks is advance,
>
>Peter Janett
>
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Regular Expression cheat please?

2000-04-24 Thread Reuben King

I have looked at the manuals for regular expression help, but I am still 
mystified as to how to accomplish a simple character stripping.  I have 
a string, ex. "hello i have spaces, and punctuation." that I want 
everything but alpha numeric characters stripped from it and spaces 
converted to underscores so that it would return 
"hello_i_have_spaces_and_punctuation"

If someone could please post the appropriate syntax for REReplace, I 
would be most thankful.  It would save me headaches!

Thanks in advance,
-R
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.



Re: regular expression help!

2001-11-08 Thread Brook Davies

You could just find the first head, store the position, find the next head, 
store the position, and then just use mid(string,pos+6,pos-1) to strip the 
middle out

maybe there is a more efficient way

Brook



At 11:32 PM 08/11/01 +, you wrote:
>The code I'm doing now is actually in JS, but I'm having a
>general CF/JS regular expression learning binge, and I've hit
>a brick wall - can anyone help?!
>
>Best example of the problem is this:
>
>string = string.replace(/]*>[^(<\/HEAD>)]*<\/HEAD>/gi,'');
>
>I want this to strip any  tags - and *anything* in
>between them. The middle bit is the problem - how do I
>match "zero or more characters up to the point where you
>find "? Putting  in parentheses and negating
>it with a carat seems to only work if there are no characters
>between in tags that appear in "". So
>
>12345678
>
>will be stripped out fine, but
>
>1234567d
>
>gets left in. I know I must be just missing one control character,
>or have one in the wrong spot, but no reference material I've
>got seems to point it out. Anyone got any hints?
>
>cheers,
>
>- Gyrus
>
>
>
~~
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 help!

2001-11-08 Thread Stuart Duncan

Try using
)[[:print:]]*()","","all")>

That should find anything with a beginning of  and an ending of 
 and strip them out and any printable character in between with an 
empty string. I'm not sitting at a coldfusion enabled server, so I can't 
verify, but it should be that, or very close to it.


Stuart Duncan.



At 11:32 PM 08/11/2001 +, you wrote:
>The code I'm doing now is actually in JS, but I'm having a
>general CF/JS regular expression learning binge, and I've hit
>a brick wall - can anyone help?!
>
>Best example of the problem is this:
>
>string = string.replace(/]*>[^(<\/HEAD>)]*<\/HEAD>/gi,'');
>
>I want this to strip any  tags - and *anything* in
>between them. The middle bit is the problem - how do I
>match "zero or more characters up to the point where you
>find "? Putting  in parentheses and negating
>it with a carat seems to only work if there are no characters
>between in tags that appear in "". So
>
>12345678
>
>will be stripped out fine, but
>
>1234567d
>
>gets left in. I know I must be just missing one control character,
>or have one in the wrong spot, but no reference material I've
>got seems to point it out. Anyone got any hints?
>
>cheers,
>
>- Gyrus
>
>
>
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: regular expression help!

2001-11-09 Thread Pascal Peters

string = string.replace(/]*>[.\n]*<\/HEAD>/gi,'');

Pascal Peters
Macromedia Certified Instructor
Certified ColdFusion (5.0) Advanced Developer
Certified Web Developer
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: gyrus [mailto:[EMAIL PROTECTED]]
Sent: vrijdag 9 november 2001 0:32
To: CF-Talk
Subject: regular expression help!


The code I'm doing now is actually in JS, but I'm having a
general CF/JS regular expression learning binge, and I've hit
a brick wall - can anyone help?!

Best example of the problem is this:

string = string.replace(/]*>[^(<\/HEAD>)]*<\/HEAD>/gi,'');

I want this to strip any  tags - and *anything* in
between them. The middle bit is the problem - how do I
match "zero or more characters up to the point where you
find "? Putting  in parentheses and negating
it with a carat seems to only work if there are no characters
between in tags that appear in "". So

12345678

will be stripped out fine, but

1234567d

gets left in. I know I must be just missing one control character,
or have one in the wrong spot, but no reference material I've
got seems to point it out. Anyone got any hints?

cheers,

- Gyrus



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



Help with regular expression

2001-11-12 Thread Seth Petry-Johnson

I am trying to build a regular expression to test for valid CFSET statements
in a block of text.  I have it working with one small issue:  if a ">"
character appears on the right hand side of the equals sign, such as in



then the regexp fails to match the whole string.  I am only concerned with
statements that set local variables which is why the regexp doesn't take
variable scope into consideration. Here is what I have right now:




Can anyone give me some pointers as to how I can modify this to support the
">" sign if it appears inside single or double quotes on the right hand side
of the equals sign?

Thanks in advance,
Seth Petry-Johnson
Argo Enterprise and Associates
~~
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



Regular Expression in CF

2000-12-28 Thread Brandon Behrens

Can anyone out there tell me how I can use a regular expression to grab an
entire script block?  Here is what I am using now:
.*|\s
This works for the following:

http://images.foxnews.com/root_js.js</A>">

However, it won't work if there is anything inside the script blocks.  Any
help would be greatly appreciated.

Thanks,

Brandon



~ Paid Sponsorship ~
Get Your Own Dedicated Win2K Server!  Instant Activation for $99/month w/Free 
Setup from SoloServer  PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support 
 Visit SoloServer, https://secure.irides.com/clientsetup.cfm.

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



Regular Expression in CF

2000-12-28 Thread Brandon Behrens

Can anyone out there tell me how I can use a regular expression to grab an
entire script block?  Here is what I am using now:
.*|\s
This works for the following:

http://images.foxnews.com/root_js.js</A>">

However, it won't work if there is anything inside the script blocks.  Any
help would be greatly appreciated.

Thanks,

Brandon 


~ Paid Sponsorship ~
Get Your Own Dedicated Win2K Server!  Instant Activation for $99/month w/Free 
Setup from SoloServer  PIII600 / 128 MB RAM / 20 GB HD / 24/7/365 Tech Support 
 Visit SoloServer, https://secure.irides.com/clientsetup.cfm.

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



Bad Regular Expression Error

2001-05-22 Thread Eron Cohen

Why does this cause a "Bad Regular Expression" error?

]*>(.*)<\/script[^>]*>","X","ALL")>

The error I get is:
InformationAn error occurred while
evaluating the expression:

VARIABLES.this_body=rereplacenocase(this_body,"]*>(.*)<\/script[^>]*>","X","ALL")

Bad regular expression

If I remove the (.*) in the middle of the two
 tags, no error occurs (but of course
I don't find what I am looking for.

Can anyone suggest a better way to get rid of script
tags (and what's between them? I don't want to use a
custom tag.)

Thanks,

Eron
~~
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: isDate() regular expression

2001-05-31 Thread Jim McAtee

If you also want to validate the date (no Jun 31, for instance), it's
going to be tough or impossible to do in a regex.  You can use one or
more regexes plus some code to parse and check the date, however.  Do
you want to do this in CF, or in JavaScript on the client side?  In CF,
can't you just use isDate()?

Jim


-Original Message-
From: Ken Beard <[EMAIL PROTECTED]>
To: CF-Talk <[EMAIL PROTECTED]>
Date: Wednesday, May 30, 2001 6:43 PM
Subject: isDate() regular expression


>I'm trying to make javascript functions that check the format of a
string
>that represents a date and time (seperate functions for date & time).
I
>want it to only accept formats that the isDate() coldfusion function
would
>accept.  My question is, does anyone know the regular expression that
the
>cf function isDate() uses?  If i had that i could just convert it to a
>posix regex and be perfect instead of guessing about/testing exactly
what
>isDate() will and won't accept.
>
>thanks in advance,
>
>Ken
>
>-
>Ken Beard
>Manager, Application Development
>Stone Ground Solutions
>5100 West Kennedy Blvd, Suite 430
>Tampa FL  33602
>813.387.1235 voice
>866.767.4051 toll free
>813.387.1237 fax
>www.stoneground.com


~~
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: isDate() regular expression

2001-05-31 Thread Ken Beard

client side, javascript.  but i need it accept the formats (and only the 
formats) that isDate() accepts.

At 08:03 PM 5/30/01 -0600, you wrote:
>If you also want to validate the date (no Jun 31, for instance), it's
>going to be tough or impossible to do in a regex.  You can use one or
>more regexes plus some code to parse and check the date, however.  Do
>you want to do this in CF, or in JavaScript on the client side?  In CF,
>can't you just use isDate()?
>
>Jim
>
>
>-Original Message-
>From: Ken Beard <[EMAIL PROTECTED]>
>To: CF-Talk <[EMAIL PROTECTED]>
>Date: Wednesday, May 30, 2001 6:43 PM
>Subject: isDate() regular expression
>
>
> >I'm trying to make javascript functions that check the format of a
>string
> >that represents a date and time (seperate functions for date & time).
>I
> >want it to only accept formats that the isDate() coldfusion function
>would
> >accept.  My question is, does anyone know the regular expression that
>the
> >cf function isDate() uses?  If i had that i could just convert it to a
> >posix regex and be perfect instead of guessing about/testing exactly
>what
> >isDate() will and won't accept.
> >
> >thanks in advance,
> >
> >Ken
> >
> >-
> >Ken Beard
> >Manager, Application Development
> >Stone Ground Solutions
> >5100 West Kennedy Blvd, Suite 430
> >Tampa FL  33602
> >813.387.1235 voice
> >866.767.4051 toll free
> >813.387.1237 fax
> >www.stoneground.com
>
>
>
~~
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



  1   2   3   >