Heya,
I know that some will know this quickly ... but I have ReplaceNoCase(str,
[^0-9\.],,ALL)
And this takes -5 to 5 ... which is not what I want - I want to include
negative numbers what do I add to this regular expression to keep the decimals
(if there) and keep the negative if there?
So
... but I have ReplaceNoCase(str,
[^0-9\.],,ALL)
And this takes -5 to 5 ... which is not what I want - I want to include
negative numbers what do I add to this regular expression to keep the
decimals (if there) and keep the negative if there?
So
5.24 is fine
-5.24 is fine
5 is fine
-5 if fine
negative numbers what do I add to this regular expression to keep the
decimals (if there) and keep the negative if there?
So
5.24 is fine
-5.24 is fine
5 is fine
-5 if fine
$5.24 (replace the $)
$5,244.22 (replace the $ and the ,)
Basically I need positive and negative
is not what I want - I want to include
negative numbers what do I add to this regular expression to keep the
decimals (if there) and keep the negative if there?
So
5.24 is fine
-5.24 is fine
5 is fine
-5 if fine
$5.24 (replace the $)
$5,244.22 (replace the $ and the ,)
Basically I need
Good deal ... thank you!
-Original Message-
From: Adam Cameron [mailto:adamcameroncoldfus...@gmail.com]
Sent: Friday, December 14, 2012 9:28 AM
To: cf-talk
Subject: Re: Regular Expression - decimal number positive negative
Recommend not reinventing the wheel here:
http
I have a regular expression issue.
I have information that says:
~{Test Information/a/li
That in a series of processing should look like ~{Test Information}~/a/li
Any idea in a rereplace how I can replace anything that is ~{*/a/li with
~{*}~/a/li
Thanks
Pat
-
Patrick Kerley
Information}~/a/li~{Test Information4}~/a/li~{Test
Information}~/a/li
-Pat
On Tue, Jun 14, 2011 at 7:49 AM, Patrick Kerley kerl...@yahoo.com wrote:
I have a regular expression issue.
I have information that says:
~{Test Information/a/li
That in a series of processing should look like
}~/a/li )#
/
Should show: ~{Test Information2}~/a/li~{Test
Information}~/a/li~{Test Information4}~/a/li~{Test
Information}~/a/li
-Pat
On Tue, Jun 14, 2011 at 7:49 AM, Patrick Kerley kerl...@yahoo.com wrote:
I have a regular expression issue.
I have information that says:
~{Test
Give this a go:
cfset Result = InputText.replaceAll
( '~\{(?:(?!/a).)+(?!\}~)(?=/a/li)'
, '$0}~'
) /
It uses the java replaceAll regex function so that it can do the negative
lookbehind to ensure existing correct items are not changed, meaning it can be
run
Sent: Tuesday, June 14, 2011 12:16 PM
Subject: Re: Regular Expression Help
Give this a go:
cfset Result = InputText.replaceAll
( '~\{(?:(?!/a).)+(?!\}~)(?=/a/li)'
, '$0}~'
) /
It uses the java replaceAll regex function so that it can do the negative
lookbehind
I'm trying to build a regular expression that only accepts images from
http://pics.mysite.com; (part of an antisamy policy)
my expression:
^((http\:\/\/pics\.mysite\.com) + ([a-zA-Z\.]))*$
the intention is to allow http://pics.mysite.com/xxx.jpg;
and disallow http://anyOtherSite.com/xxx.jpg
how about cfif { var } contains pics.mysite.com ?
On Thu, Dec 3, 2009 at 4:55 PM, Andrew Grosset rushg...@yahoo.com wrote:
I'm trying to build a regular expression that only accepts images from
http://pics.mysite.com; (part of an antisamy policy)
my expression:
^((http\:\/\/pics\.mysite
cfif
reFindNoCase(\Ahttp://pics\.mysite\.com/.*?\.(gif|jpg|jpeg|png|bmp)\Z,picUrl)
EQ 0
// don't allow the pic
/cfif
There is no reason to escape the : or the / like you've done in your
example. Neither of those are special characters.
Yes that would work but this is part of an antisamypolicy.xml file that filters
all user input - for more info see: Using AntiSamy to protect your CFM pages
from XSS hacks
http://tinyurl.com/yhl34tn
how about cfif { var } contains pics.mysite.com ?
On Thu, Dec 3, 2009 at 4:55 PM, Andrew
Ah, cool. Didn't know about AntiSamy. Reading up :)
On Thu, Dec 3, 2009 at 5:18 PM, Andrew Grosset rushg...@yahoo.com wrote:
Yes that would work but this is part of an antisamypolicy.xml file that
filters all user input - for more info see: Using AntiSamy to protect your
CFM pages from
Solved!
(http://pics.mysite.com/ + [a-zA-Z\.])*
http://pics1.mysite.com/xxx.jpg and http://pics.mysite.com/xxx*.jpg are both
rejected
and http://pics.mysite.com/xxx.jpg is accepted.
Ah, cool. Didn't know about AntiSamy. Reading up :)
On Thu, Dec 3, 2009 at 5:18 PM, Andrew Grosset
I want to allow letters,numbers,_,-,: and $
regexp name=letternumber value= [a-zA-Z0-9\_\-:\%]+/
it returns false with : , slowly pulling my hair out and have exhausted
Google - any suggestions?
thanks, Andrew.
~|
Adobe®
[A-Za-z0-9_:%\$-]+
Does that work for ya? Two things that jump out at me:
1) You're escaping several items that don't need escaping, and
2) any time you need to use -, it needs to be the character in the
character class (otherwise the regex engine thinks you're trying to define a
range)
HTH
2) any time you need to use -, it needs to be the character in the
You missed the critical word! ;)
It needs to be the LAST character in the set.
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release
Damn wireless keyboards! ;-)
On Sat, Mar 14, 2009 at 5:54 AM, Peter Boughton wrote:
2) any time you need to use -, it needs to be the character in the
You missed the critical word! ;)
It needs to be the LAST character in the set.
many thanks! I was working on an antisamy script which uses a whitelist to
parse user input and this regular expression appeared to be not working, turns
out that there appears to be a bug when using style as an inline attribute of
a tag such as div or span.
Andrew
I am trying to make a regular expression to find # .. \ / and % in a string,
but I am new to expressions. Anyone have a good link for beginners on doing
this?
~|
Adobe® ColdFusion® 8 software 8 is the most important
the regex to look
for each of those chars individually instead of as one string.
andy
-Original Message-
From: Mike Wesling [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 19, 2008 9:04 AM
To: cf-talk
Subject: regular expression to find #
I am trying to make a regular expression to find
to make a regular expression to find # .. \ / and % in a
string, but I am new to expressions. Anyone have a good link for beginners
on doing this?
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release
forces the regex to
look
for each of those chars individually instead of as one string.
andy
I am trying to make a regular expression to find # .. \ / and % in
a
string, but I am new to expressions. Anyone have a good link for
beginners
on doing
I thought you cannot just place a . or \ as they are special
characters.
The . is not special when used within a character class (the square brackets).
i.e. You do *not* need to escape [.] - that will match dot, not 'any character'.
I also need to find a double . not a single.
A character
What I'd like to want to do is to replace a value from a simple text which
looks like this:
a=
b=tyweu8939skdksspdssdsd
c=sd
How do I replace the value of b when the b value is unknown?
Thanks.
~|
Adobe® ColdFusion® 8
Also try the HOF regex list (which gets monitored by many, although there
are few postings)
is that a line break before and after the b= line?
On Thu, Nov 13, 2008 at 12:11 PM, Don L [EMAIL PROTECTED] wrote:
What I'd like to want to do is to replace a value from a simple text which
looks
In the example below, you only want to replace the b while leaving the a and
c alone, right? Will the b always have a format of
b=tyweu8939skdksspdssdsd. Does tyweu8939skdksspdssdsd have a pattern to
it? Is it that the b= values always have 21 characters after it?
Point is, what's the pattern
[mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 11:11 AM
To: cf-talk
Subject: Any regular expression guru here?
What I'd like to want to do is to replace a value from a simple text which
looks like this:
a=
b=tyweu8939skdksspdssdsd
c=sd
How do I replace the value of b when the b
:11
To: cf-talk
Subject: Any regular expression guru here?
What I'd like to want to do is to replace a value from a simple text which
looks like this:
a=
b=tyweu8939skdksspdssdsd
c=sd
How do I replace the value of b when the b value is unknown?
Thanks
Adrian...
The OP said he didn't know in advance what the value of b would be. If he
did, yours would work great.
-Original Message-
From: Adrian Lynch [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 13, 2008 11:35 AM
To: cf-talk
Subject: RE: Any regular expression guru here?
Here's
Ah! I think he meant the right side of the equals sign after b.
But, if the value (right side of the =) contains 'b=' then we're in trouble
again.
Adrian
-Original Message-
From: Andy Matthews
Sent: 13 November 2008 17:58
To: cf-talk
Subject: RE: Any regular expression guru here
In the example below, you only want to replace the b while leaving the a and
c alone, right?
Right.
Will the b always have a format of
b=tyweu8939skdksspdssdsd. Does tyweu8939skdksspdssdsd have a pattern to
it?
Not certain, most likely yes. It's the cf8's encrypted password for the admin.
Is
Ah! I think he meant the right side of the equals sign after b.
But, if the value (right side of the =) contains 'b=' then we're in trouble
again.
Yes, exactly, one way (theoritically) would be, have 3 segements for all 3
lines and
find the seg2.element[2].value, but I don't know regexp...
Subject: Re: Any regular expression guru here?
From: Don L [EMAIL PROTECTED]
Date: Thu, November 13, 2008 12:08 pm
To: cf-talk cf-talk@houseoffusion.com
In the example below, you only want to replace the b while leaving the a and
c alone, right?
Right.
Will the b always have a format of
b
It's the cf8's encrypted password for the admin.
Well technically, it's an SHA-1 hash...
It sounds like you're basically trying to parse your
lib\password.properties file?
Perhaps there is another way to accomplish your task through the
adminAPI?
~Brad
Brad, good thought, just looked at the
Well, since the objective is to disable cf admin access. Just realized a silly
and yet effective way would be to move the CFIDE directory away from web root.
I hope it won't adversely impact the cf8 server.
What I'd like to want to do is to replace a value from a simple text
which looks
Please help, banging my head against a wall and my deadline is up...
I need to search a text filed of html formatted text to see if the user enter
in bad words
I have it all set to go but the regexp is giving me trouble.
I am looping over the list of badwords and checking the variable skills.
I think you want something like this:
cfif REFindnocase(([\s\]#badword#[\s\]),skills)
You may want to expand it to non-alphanumeric wrappers, though, to catch
punctuation: he gave her a kiss.
cfif REFindnocase(([\W]#badword#[\W]),skills)
which is the same as
cfif
Not sure what I am doing wrong but this is not working.
I have the string kissess are goodbrkissbrthe girlfriend
Kiss is a badword, and this regexp is not picking it up.
Please advise and thanks for your help.
Matt
I think you want something like this:
cfif
Hm, that should work, certainly. Did you try that 3rd option?
cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),skills)
That should find any use of the word 'kiss' when it's surrounded by any
non-alpha characters. Sadly I don't have access to my CF environment right at
the moment,
Forgot about Ryan Swanson's slick little tool. It certainly validates and
picks up the middle 'kiss' in his validator, using either '\W' or '^a-zA-Z0-9_'
as the filter:
http://ryanswanson.com/regexp/#start
~|
Adobe®
Figured out the issue, this works great.
Thank you, thank you, thank you
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
I just found an issue with this regexp
cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),clean_skills)
this works great if it is not the first word or only word in the string.
what do I need to do to update the regexp to pick up the bad word it is the
first last or only word in the
Typo: cfif REFindnocase(((^|\W)#badword#(\W|$)),clean_skills)
On Fri, Oct 31, 2008 at 1:09 PM, Sonny Savage [EMAIL PROTECTED] wrote:
cfif REFindnocase(((^|\W)#badword#(\W|$),clean_skills)
On Fri, Oct 31, 2008 at 1:04 PM, Matthew Friedman [EMAIL PROTECTED]wrote:
I just found an issue with
Good call. Try this, seems to work in initial testing:
cfif REFindnocase(((^|[^a-zA-Z0-9_])#badword#([^a-zA-Z0-9_]|$)),
clean_skills)
I just found an issue with this regexp
cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),
clean_skills)
this works great if it is not the first
cfif REFindnocase(((^|\W)#badword#(\W|$),clean_skills)
On Fri, Oct 31, 2008 at 1:04 PM, Matthew Friedman [EMAIL PROTECTED] wrote:
I just found an issue with this regexp
cfif REFindnocase(([^a-zA-Z0-9_]#badword#[^a-zA-Z0-9_]),clean_skills)
this works great if it is not the first word or
Hi all,
I am trying to replace
April 01 2008 with April 1 2008 or
April 02 2008 with April 2 2008, ..
This is a start
cfset Date = #Replace(#Date#,^[A-Za-z]+,April
)#
Can anybody help me?
Thanks
On Tue, Apr 1, 2008 at 12:35 PM, Suresh [EMAIL PROTECTED] wrote:
I am trying to replace
April 01 2008 with April 1 2008 or
April 02 2008 with April 2 2008, ..
This is a start
cfset Date = #Replace(#Date#,^[A-Za-z]+,April
)#
cfset myDate = April 01 2008 /
You'd want to use ReReplace, rather than Replace of course. But
probably just formatting it with dateformat() would work:
cfset Date = dateformat(date, d ) /
Also, don't know if this is still a problem in CF, but be careful
about calling variables date...
Cheers,
Kris
I am trying to
You can call them date as long as they're not form field variables.
-Original Message-
From: Kris Jones [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 2:48 PM
To: CF-Talk
Subject: Re: Help with Regular expression
You'd want to use ReReplace, rather than Replace of course
or SQL column names...
-Original Message-
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2008 3:24 PM
To: CF-Talk
Subject: RE: Help with Regular expression
You can call them date as long as they're not form field variables.
-Original Message
I need some help with an area of ColdFusion which I would call my
Achilles Heal of ColdFusion Programming. I cannot get my mind around
Regular Expressions, but know its the solution to many of my
problems. For example
I have the following CF Comment on a cfm page:
!---
Widget Name: My
Is there anybody out there who can help me do this?
Sure, there is CF_REextract.
It will return all your fields in a list or a query, and even read the
file for you.
See: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm
starting with the first instance of !--- and
ending with the next instance of ---
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
-Original Message-
From: Philip Hayes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 23, 2008 10:53 AM
To: CF-Talk
Subject: Regular
Although it will still work exactly the same, it actually finds everything
between the first instance of !--- and --
I used html comments for testing and forgot to change the -- to ---
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
That's pretty cool. i have never seen that tag before. I'll try it.
Thanks
On Jan 23, 2008, at 11:58 AM, Claude Schneegans wrote:
Is there anybody out there who can help me do this?
Sure, there is CF_REextract.
It will return all your fields in a list or a query, and even read the
file for
Here's one approach:
!--- Comments with fields ---
cfset regexComment = !---(.*?)---
cfset regexCommentFields = ^(.*?):(.*)$
cfset fileContent = blah blah!--- Sample Comment ---ya ya
!---
Widget Name: My Widget
Widget URL: http://siriusinnovations.com
Description: This is the description
Version:
Yeah, maybe he's looking for something like qryUser[currentrow - 1]?
Steve Cutter Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_
http://blog.cutterscrossing.com
Michael Dinowitz wrote:
The back-reference variables (\1, etc.) can't
First, you are not setting the results to a variable
Try...
cfset THESTRING = reReplace(thestring,'\w*{(\w+)}','#qryUser[\1]#','all')/
But using \1 in a var isn't going to work like that. Youll need 2 lines...
cfset THESTRING = reReplace(thestring,'\w*{(\w+)}','\1','all')/
cfset THESTRING =
CF evaluates the replace string *before* sending it to the regular
expression engine. Therefore, it's trying to find the struct key named
'\1' which is not legal. There are several ways to get around this, but
they all basically boil down to doing it in two steps.
--BenD
Johnny Le wrote:
I
I tried to do this:
cfset thestring = user.listid={id}username={username}/
cfset reReplace(thestring,'\w*{(\w+)}','#qryUser[\1]#','all')/
but I got an error. Is it possible to use \1 as a variable? I even tried
'#evaluate(qryUser[\1])# but it doesn't work.
The back-reference variables (\1, etc.) can't be used as a value of a
ColdFusion function within a RE tag.
On Dec 3, 2007 10:42 PM, Johnny Le [EMAIL PROTECTED] wrote:
I tried to do this:
cfset thestring = user.listid={id}username={username}/
cfset
On Friday 18 May 2007, K Simanonok wrote:
Tom, you may be well-intentioned, but do you realize your posts were
useless? A question like Hey buddy, can you tell me where the train
station is? is never intended to be taken so literally that yes is a
worthwhile answer.
You didn't ask 'how do
]
Sent: Thursday, May 17, 2007 11:53 PM
To: CF-Talk
Subject: RE: Regular Expression to count links
Actually... the while loop I posted is considerably faster. About 16ms
faster. Maybe it's the loop or the cfscript... I dunno
That may be what I did, can't remember. But... that method worked and was 16
times faster ;-)
-Original Message-
From: chopper [mailto:[EMAIL PROTECTED]
Sent: Friday, May 18, 2007 12:12 PM
To: CF-Talk
Subject: Re: Regular Expression to count links
True about the runaway loop
Thanks Charlie, looks like your solution will work, I'll test.
Andy, I appreciate your suggestion even if it won't work.
Tom, you may be well-intentioned, but do you realize your posts were useless?
A question like Hey buddy, can you tell me where the train station is? is
never intended to be
[mailto:[EMAIL PROTECTED]
Sent: Thursday, May 17, 2007 9:52 PM
To: CF-Talk
Subject: Re: Regular Expression to count links
Thanks Charlie, looks like your solution will work, I'll test.
Andy, I appreciate your suggestion even if it won't work.
Tom, you may be well-intentioned, but do you realize
of a
2) remove the instance of a
3) repeat until no more instances of a
-Original Message-
From: K Simanonok [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 17, 2007 9:52 PM
To: CF-Talk
Subject: Re: Regular Expression to count links
Thanks Charlie, looks like your solution
Actually... the while loop I posted is considerably faster. About 16ms
faster. Maybe its the loop or the cfscript... I dunno.
-Original Message-
From: chopper [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 17, 2007 11:33 PM
To: CF-Talk
Subject: Re: Regular Expression to count links
-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 17, 2007 11:53 PM
To: CF-Talk
Subject: RE: Regular Expression to count links
Actually... the while loop I posted is considerably faster. About 16ms
faster. Maybe its the loop or the cfscript... I
That's also a runaway loop when there are no links found ;-)
-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 17, 2007 11:53 PM
To: CF-Talk
Subject: RE: Regular Expression to count links
Actually... the while loop I posted is considerably faster
Is it possible to use a regular expression to count the number of links A
HREF=http://something.com;like so/A in a given block of text?
~|
ColdFusion MX7 by Adobe®
Dyncamically transform webcontent into Adobe PDF with new
On Wednesday 16 May 2007, K Simanonok wrote:
Is it possible to use a regular expression to count the number of links A
HREF=http://something.com;like so/A in a given block of text?
Yes, finding matches of a pattern in a block of text is exactly what it is
for.
--
Tom Chiverton
To: CF-Talk
Subject: Regular Expression to count links
Is it possible to use a regular expression to count the number of links A
HREF=http://something.com;like so/A in a given block of text?
~|
Deploy Web Applications Quickly
On Wednesday 16 May 2007, Andy Matthews wrote:
cfset hrefCount = ArrayLen(ListToArray(String,href))
I'm not sure that does what you think it does.
http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentationfile=0353.htm#3082862
If
yeah. can't use multiple character delimiters in CF. Not with native
CF array/list functions.
if you use split(), you can.
cfset myString = a_!_b_!_c_d!e_f /
cfset myArray = myString.split('_!_') /
cfoutput
#listLen(myString, '_!_')#
br /
#arrayLen(myArray)#
/cfoutput
I need help with the following search and replace using regular expressions. I
am a beginner as far as regular expressions are considered. I am using
javascript to execute these regualr expressions.
I have a huge HTML in a variable, I would like to remove some tags from it and
in some cases
I need help with the following search and replace using regular
expressions.
You could use CF_REExtract (see
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm )
First get all occurences of input tags in a query,
then loop in the query, check the presence of string replace
Thanks for the reply!
I am trying to do this on the client side. Also I want do this whole thing
using regex and avoid using loops and comparisons, as the HTML can be huge and
I want it to be fast. Any other suggestions.
Is it even possible to get what I want using regular expressions?
.*?class.*?)replace(.*?.*?), \1\2, all)
if not, maybe someone can convert those to JS for you.
Cheers
-Original Message-
From: Bhasker Konakanchi [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 16, 2007 1:59 PM
To: CF-Talk
Subject: regular expression to match and replace tag set
I need
That is simly great! I have tested the first expression and it worked like a
charm. I haven't tested the second one yet, I will post the results once I test
it.
Thank you very much for your help.
-BK
I haven?t played with javascript regexes much so I'd personally send it off
to be processed
I am working on a variable mask version as I have time. This one will
atleast mask the domain for now.
Eric
On 2/20/07, Eric Haskins [EMAIL PROTECTED] wrote:
cfset email = ReReplaceNocase(email,
([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}),
[EMAIL PROTECTED])/
Try
cfset variables.domainlen = Len(ReReplaceNocase(attributes.email,
([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}),
\2)) - 1
cfset variables.mask =
cfloop from=1 to=#variables.domainlen# index=i
cfset variables.mask = variables.mask *
/cfloop
cfset variables.email =
I would like to use a regular expression to camouflage email addresses in a
forum I'm building. I'd like to replace just the domain name (not the .com or
.net or other extension though) with x's:
FROM THIS: [EMAIL PROTECTED]
TO THIS:[EMAIL PROTECTED]
Where the number of x's exactly
I would like to use a regular expression to camouflage email addresses in a
forum I'm building. I'd like to replace just the domain name (not the .com or
.net or other extension though) with x's:
FROM THIS: [EMAIL PROTECTED]
TO THIS:[EMAIL PROTECTED]
Where the number of x's exactly
cfset email = ReReplaceNocase(email,
([a-zA-Z0-9_\-\.]+)@((([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3}),
[EMAIL PROTECTED])/
Try this one
Eric
On 2/20/07, K Simanonok [EMAIL PROTECTED] wrote:
I would like to use a regular expression to camouflage email addresses in
a forum I'm building
I would like to use a regular expression to camouflage email addresses in a
forum I'm building. I'd like to replace just the domain name (not the .com or
.net or other extension though) with x's:
FROM THIS: [EMAIL PROTECTED]
TO THIS:[EMAIL PROTECTED]
Where the number of x's exactly
Simanonok wrote:
I would like to use a regular expression to camouflage email addresses in a
forum I'm building. I'd like to replace just the domain name (not the .com
or .net or other extension though) with x's:
FROM THIS: [EMAIL PROTECTED]
TO THIS:[EMAIL PROTECTED]
Where the number
Hello.
Does anyone know how I can implement a regex callback?
ie: I have the following code:
cfset Content = REReplace(Content,'''cfif \(Var\(([^,]+),([^]+))\)
([A-Z]+) ([^]+\)', '''cfif (Var(\1),\2)) \3 \4', all)/
And I need to run a function on \1, \3 and \4 as they are replaced.
I'm fairly
-
From: Peter Boughton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 10:41 AM
To: CF-Talk
Subject: regular expression - callback function
Hello.
Does anyone know how I can implement a regex callback?
ie: I have the following code:
cfset Content = REReplace(Content,'''cfif \(Var
.
.
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
Need ColdFusion Help?
www.bennadel.com/ask-ben/
-Original Message-
From: Peter Boughton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 10:41 AM
To: CF-Talk
Subject: regular expression
: Peter Boughton [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 12:21 PM
To: CF-Talk
Subject: Re: regular expression - callback function
Thanks Ben, that's great! :D
I did solve my main problem another way, but I should be able to get
more elegant code with your method, so I'll have
How would you do numbers under one hundred with a limit of 7 decimals?
Lee Surma
Applications Systems Engineer
Wells Fargo Corporate Trust
[EMAIL PROTECTED]
612-667-4066
~|
Upgrade to Adobe ColdFusion MX7
Experience
Not really sure what exactly you are looking to do, but the regular
expression pattern for numbers under 100 with 7 decimals would be:
\d{2}(\.\d{1,7})?
This makes the decimal optional (with 1 to 7 decimal places). Of course,
this does not protect AGAINST numbers over one hundred. For that you
Ben Nadel wrote:
Not really sure what exactly you are looking to do, but the regular
expression pattern for numbers under 100 with 7 decimals would be:
\d{2}(\.\d{1,7})?
I'd anchor it, assuming that this is supposed to be the whole string:
^\d{2}(\.\d{1,7})?$
--Ben Doom
: Regular Expression Help
Ben Nadel wrote:
Not really sure what exactly you are looking to do, but the regular
expression pattern for numbers under 100 with 7 decimals would be:
\d{2}(\.\d{1,7})?
I'd anchor it, assuming that this is supposed to be the whole string:
^\d{2}(\.\d{1,7})?$
--Ben
That would not match 0 through 9.999 unless they were formatted into 2
digit numbers like 00, 01, etc... 09.999 It also wouldnt match anything
between 1 and 0 like .999 unless it was formatted like 00.999
Try this one: ^\d{0,2}(\.\d{1,7})?$
I dont know what you are using it for
for 'href' and so on, but the RIGHT regular expression would make sure
all possibilities are covered like href=, href=' or href= or href = and
so on.
Can anyone help please?
Thanks!
Dave
~|
Upgrade to Adobe ColdFusion MX7
1 - 100 of 455 matches
Mail list logo