converting sed to rereplace ...

2011-05-05 Thread Rick Colman
I am trying to convert strings: (A XXX)(B YYY)(C ZZZ) etc. to XXXYYYZZZ etc. This works in sed: echo (A XXX)(B YYY)(C ZZZ) | \ sed -n ' { s/([A-Z]* \([A-Z]*\))/\1/g p } ' but when I put it into rereplace, like: cfset construct[LoopCount] = rereplace(#construct[LoopCount]#, [A-Z

RE: converting sed to rereplace ...

2011-05-05 Thread Bobby Hartsfield
cfset str = (A XXX)(B YYY)(C ZZZ) / cfset newstr = rereplace(str, \([A-Z] ([A-Z]{3})\), \1, all) / .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Rick Colman [mailto:rcol...@cox.net] Sent: Thursday, May 05, 2011 5:43 PM

Re: converting sed to rereplace ...

2011-05-05 Thread Rick Colman
Eureka! TNX. On 5/5/2011 3:13 PM, Bobby Hartsfield wrote: cfset str = (A XXX)(B YYY)(C ZZZ) / cfset newstr = rereplace(str, \([A-Z] ([A-Z]{3})\), \1, all) / .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Rick

Re: Variable before query, rereplace or javascript to change title

2010-11-19 Thread Joel Black
cfsavecontent variable=pageTitletitleYour title cfoutput - #Yourvaraible#/cfoutput/title/cfsavecontent cfhtmlhead text=#pageTitle# This will put #pageTitle# in the head of the document. On Thu, Nov 18, 2010 at 4:05 PM, Joel Black j...@blackbeardesign.comwrote:

Re: Variable before query, rereplace or javascript to change title

2010-11-19 Thread Joel Black
Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else. I simply added this to my custom tag and it does just what its supposed to! Never even knew this tag existed, thanks a million! ~|

Re: Variable before query, rereplace or javascript to change title

2010-11-19 Thread Michael Grant
Slightly OT, but I suspect this indicates that your app would benefit from a separation of display logic and business logic. On Fri, Nov 19, 2010 at 10:24 AM, Joel Black j...@blackbeardesign.comwrote: Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else.

Re: Variable before query, rereplace or javascript to change title

2010-11-19 Thread Gerald Guido
I simply added this to my custom tag and it does just what its supposed to! Yep. Reason 32,657 why CF Roxorz. G! On Fri, Nov 19, 2010 at 10:24 AM, Joel Black j...@blackbeardesign.comwrote: Gerald, cfhtmlhead text= was the key. I didnt even have to savecontent or anything else. I simply

Re: Variable before query, rereplace or javascript to change title

2010-11-19 Thread Michael Grant
...until you need to hire five new developers in any place that isn't California. :( On Fri, Nov 19, 2010 at 11:04 AM, Gerald Guido gerald.gu...@gmail.comwrote: I simply added this to my custom tag and it does just what its supposed to! Yep. Reason 32,657 why CF Roxorz. G! On Fri,

Variable before query, rereplace or javascript to change title

2010-11-18 Thread Joel Black
an output before a query that I know of 3. Not sure if an ReReplace will work in this situation either 4. I know I can do it with javascript, but javascript is client side and will not change the title in time for a search engine to catch it will it? Any input would be greatly appreciated. Example

Re: Variable before query, rereplace or javascript to change title

2010-11-18 Thread Claude Schnéegans
2. I want the news title to be in the page title, but I cant put an output before a query that I know of No, but you can run the query before any HTML, ie : CFQUERY NAME=myQuery --- get the tithe in son=me column --- SELECT title, ... /CFQUERY html head

RE: Variable before query, rereplace or javascript to change title

2010-11-18 Thread Brook Davies
: Joel Black [mailto:j...@blackbeardesign.com] Sent: November-18-10 12:27 PM To: cf-talk Subject: Variable before query, rereplace or javascript to change title I created a custom tag I can reuse, which runs a news manager. I would like to optimize it for search engines, but here is my issue: 1

Re: Variable before query, rereplace or javascript to change title

2010-11-18 Thread Joel Black
Wrap the custom tag in a cfsavecontent tag at the top of the page: I gave this a try, but when I wrap it in the savecontent, its not reading the query when I put it in the title ~| Order the Adobe Coldfusion Anthology now!

Re: Variable before query, rereplace or javascript to change title

2010-11-18 Thread Joel Black
Wrap the custom tag in a cfsavecontent tag at the top of the page: I tried to do this, but the query.title doesnt read the query within the save content. I also tried to set a variable within the custom tag and pull that out...but no success there either. What if i set an application

Re: Variable before query, rereplace or javascript to change title

2010-11-18 Thread Gerald Guido
cfsavecontent variable=pageTitletitleYour title cfoutput - #Yourvaraible#/cfoutput/title/cfsavecontent cfhtmlhead text=#pageTitle# This will put #pageTitle# in the head of the document. On Thu, Nov 18, 2010 at 4:05 PM, Joel Black j...@blackbeardesign.comwrote: Wrap the custom tag in a

RE: Variable before query, rereplace or javascript to change title

2010-11-18 Thread Brook Davies
To: cf-talk Subject: Re: Variable before query, rereplace or javascript to change title Wrap the custom tag in a cfsavecontent tag at the top of the page: I tried to do this, but the query.title doesnt read the query within the save content. I also tried to set a variable within the custom tag

rereplace for removing repeating characters

2010-11-02 Thread Richard White
Hi, i need to replace all repeating commas in a string with only one comma, plus remove the trailing comma, have tried a few different routes unsuccessfully and would appreciate any input: for example i would the the string: 'Genns,,DrBish Stratford,,,' to become: 'Genns,Dr,Bish

Re: rereplace for removing repeating characters

2010-11-02 Thread David McGraw
I am sure there are some nice slick regular expressions to do this, but I just simply do this a very dumbed down way. cfset myVar = ReplaceNoCase(myVar , ,, ,, ALL) cfset myVar = ReplaceNoCase(myVar , , ,, ALL) cfset myVar = ReplaceNoCase(myVar , ,, ALL) cfset myVar =

Re: rereplace for removing repeating characters

2010-11-02 Thread Richard White
thanks for the reply, i actually just found a shortcut! i converted the string to an array which removed any empty array elements, and then converted back to a list and therefore deleted all the duplicate, and trailing commas I am sure there are some nice slick regular expressions to do

Re: rereplace for removing repeating characters

2010-11-02 Thread Azadi Saryev
try this: cfset string = rereplace(rereplace(string, ,+$, ), ,+, ,, all) Azadi On 02/11/2010 20:34 , Richard White wrote: Hi, i need to replace all repeating commas in a string with only one comma, plus remove the trailing comma, have tried a few different routes unsuccessfully and would

Re: REReplace Statment Help

2009-10-22 Thread Peter Boughton
This will replace everything that is not alphanumeric with a dash: ProductPageName = rereplace( Form.PageName , '\W' , '-' , 'All' ) However, the above will change this that to this---that, if you would prefer a single dash in situations like this, you can simply do this: ProductPageName

REReplace Statment Help

2009-10-21 Thread Glyn Jackson
I am just going over some old code, I found the following... productPageName = Replace(#FORM.pageName#, ,-,All); productPageName = REReplace(#productPageName#,[.*+?^${}()|[\]/\\],,All); its seems like its create a page name but removed spaces and special characters i.e. this page! becomes

Re: REReplace Statment Help

2009-10-21 Thread Scott Stroz
these two lines of code into a UDF. On Wed, Oct 21, 2009 at 11:07 AM, Glyn Jackson glyn.jack...@newebia.co.uk wrote: I am just going over some old code, I found the following... productPageName = Replace(#FORM.pageName#, ,-,All); productPageName = REReplace(#productPageName#,[.*+?^${}()|[\]/\\],,All

Re: REReplace Statment Help

2009-10-21 Thread Eric Cobb
If you want it in one line, just combine them: productPageName = Replace(REReplace(FORM.pageName,[.*+?^${}()|[\]/\\],,All), ,-,All); BTW, you don't the the #'s inside of a function unless the variable is in quotes. Thanks, Eric Cobb http://www.cfgears.com Glyn Jackson wrote: I am just

Re: REReplace Statment Help

2009-10-21 Thread Glyn Jackson
Makes sense, thanks you. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327452

Re: REReplace Statment Help

2009-10-21 Thread Mahcsig
also, if you are replace all non alpha-numeric characters you can do this:reReplace(arguments.txt, '[^[:alnum:].]', '-', 'all'); ~Mahcsig On Wed, Oct 21, 2009 at 8:57 AM, Glyn Jackson glyn.jack...@newebia.co.ukwrote: Makes sense, thanks you.

Re: REreplace function for special characters

2008-12-14 Thread Azadi Saryev
[q] FileName = rereplace(FileName, '(?!\.[^.]*$)\W', '', 'all') [/q] well, that is just beautiful! Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic

Re: REreplace function for special characters

2008-12-12 Thread Azadi Saryev
hmm... i guess i forgot to paste in the rest of the code... here it is in all its ugly gory: cfset filename = rereplace(left(filename, len(filename)-len(listlast(filename, .))-1), \W, , all) . listlast(filename, .) it may be eugh and ugly!, but it's a one-liner and takes care of . inside

Re: REreplace function for special characters

2008-12-12 Thread Peter Boughton
FileName = rereplace( FileName , '(?!\.[^.]*$)\W' , '' , 'all' ) Strips all non-word characters, excluding the final dot (if any). Although, thinking a bit more... for general purpose use, I might not bother stripping dots, or hyphens, or tilde, so might end up with this instead: FileName

Re: REreplace function for special characters

2008-12-11 Thread Peter Boughton
better then just do something like rereplace(left(filename, len(filename)-len(listlast(filename, .)-1), \W, , all) Eugh. Ugly! And doesn't restore the extension afterwards, so my-image-name.png would become myimagename instead of myimagename.png

Re: REreplace function for special characters

2008-12-11 Thread Don L
My follow-up posted last night didn't show up. So, I'm re-doing it now. Execellent, Peter, thank you very much. I'll use rereplace( FileName , '\W' , '' , 'all' ) On the extension stuff I have a way to address it. Don rereplace(foo, '[^\w]', '', 'all') will replace any non-alphanumeric

REreplace function for special characters

2008-12-10 Thread Don L
Regular Expression gurus. How to use the REreplace function to remove special characters including +, . in an image file name? The ReplaceList function may miss some unexpected special characters for we don't know what sort of special character may show up in a dynamically generated image

Re: REreplace function for special characters

2008-12-10 Thread Charlie Griefer
rereplace(foo, '[^\w]', '', 'all') will replace any non-alphanumeric character in 'foo' (assuming 'foo' is the file name). On Wed, Dec 10, 2008 at 1:41 PM, Don L [EMAIL PROTECTED] wrote: Regular Expression gurus. How to use the REreplace function to remove special characters including

Re: REreplace function for special characters

2008-12-10 Thread Don L
rereplace(foo, '[^\w]', '', 'all') will replace any non-alphanumeric character in 'foo' (assuming 'foo' is the file name). On Wed, Dec 10, 2008 at 1:41 PM, D Great. Thank you. I also found out that REreplace(str, [^a-zA-Z0-9],,all) would achieve the same result but yours seems more elegant

Re: REreplace function for special characters

2008-12-10 Thread Peter Boughton
rereplace(foo, '[^\w]', '', 'all') will replace any non-alphanumeric character No need to complicate things with an inverted character class. \W is same as [^\w] Also, this bugs me immensely: assuming 'foo' is the file name JUST USE THE VARIABLE FILENAME THEN! So: rereplace( FileName , '\W

Re: REreplace function for special characters

2008-12-10 Thread Charlie Griefer
On Wed, Dec 10, 2008 at 3:02 PM, Peter Boughton [EMAIL PROTECTED] wrote: rereplace(foo, '[^\w]', '', 'all') will replace any non-alphanumeric character No need to complicate things with an inverted character class. \W is same as [^\w] fair enough. good catch. Also, this bugs me

Re: REreplace function for special characters

2008-12-10 Thread Peter Boughton
Hmmm, another thought... Don, when you say image file name, is there a file extension to worry about (i.e. jpg/png/etc) If so, you'll want to be doing something like this... rereplace( FileName , '(png|jpg|gif|tif|bmp)$' , '.\0' ) after the initial replacement, to restore the dot

Re: REreplace function for special characters

2008-12-10 Thread Peter Boughton
I also found out that REreplace(str, [^a-zA-Z0-9], ,all) would achieve the same result but yours seems more elegant (which seems to say just keep {words}), my CF env = cf8 or cf81 for Windows, does your solution have any dependency? No dependency. \W [^\w] and [^a-zA-Z0-9] will all work

Re: REreplace function for special characters

2008-12-10 Thread Peter Boughton
Sorry, typo. :( In CFML/rereplace it is treated as [a-zA-Z0-9_] (not the underscore). That should say note rather than not. Underscore is included in \w (and excluded from \W) which is not what some people might expect/want

Re: REreplace function for special characters

2008-12-10 Thread Azadi Saryev
better then just do something like rereplace(left(filename, len(filename)-len(listlast(filename, .)-1), \W, , all) Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Peter Boughton wrote: Hmmm, another thought... Don, when you say image file name, is there a file extension to worry about

Re: REReplace to avoid HTML elements

2008-11-07 Thread Peter Boughton
we ultimately came up with this: (?![/]#Variables.Word#)(\W)(#Variables.Word#)(\W) The only downside that we found is if the word is at the very end or beginning of the paragraph. That's the \W bits you're using - they're wrong; you want a zero-width word boundary, not a non-word character.

Re: REReplace to avoid HTML elements

2008-11-07 Thread Aaron Rouse
Thanks, I will try that out locally and make a note to apply it the next time I am in there since I already initiated the push process to get the changes into place. On Fri, Nov 7, 2008 at 8:03 AM, Peter Boughton [EMAIL PROTECTED] wrote: we ultimately came up with this:

Re: REReplace to avoid HTML elements

2008-11-07 Thread s. isaac dealey
That's the \W bits you're using - they're wrong; you want a zero-width word boundary, not a non-word character. Use \b(#Variables.Word#)\b and you wont need to do the workaround. Thanks Peter... I'd never used word boundaries... so of course, they don't occur to me when I go to write a

Re: REReplace to avoid HTML elements

2008-11-07 Thread Aaron Rouse
The \b actually did not work, it put the link within the first span element but maybe was how I tested it. I tried: (?![/]sub)(\b)(sub)(\b) as well as (?![/]sub)\b(sub)\b On Fri, Nov 7, 2008 at 10:49 AM, s. isaac dealey [EMAIL PROTECTED] wrote: That's the \W bits you're using - they're

Re: REReplace to avoid HTML elements

2008-11-07 Thread Peter Boughton
The \b actually did not work, it put the link within the first span element but maybe was how I tested it. I tried: (?![/]sub)(\b)(sub)(\b) as well as (?![/]sub)\b(sub)\b Ah, you need to change your \2 to \1 in your replace part. Since the \b is zero-width, it looks like it wont populate a

REReplace to avoid HTML elements

2008-11-06 Thread Aaron Rouse
I have been using REReplace to find key words or group of words within paragraphs and if found to replace those with an HREF. All has been working fine and well until recently when one of those key words became sub and some paragraphs make use of the HTML element SUB. So what I am curious

Re: REReplace to avoid HTML elements

2008-11-06 Thread Peter Boughton
I have been using REReplace to find key words or group of words within paragraphs and if found to replace those with an HREF. The following code works. (I haven't yet decided whether it's entirely the best way though...) cfset Content = ListToArray(Content,'')/ cfloop index=i from=1

Re: REReplace to avoid HTML elements

2008-11-06 Thread Aaron Rouse
worked had my test data not had the word at the very end of the paragraph with no period after it. On Thu, Nov 6, 2008 at 1:13 PM, Peter Boughton [EMAIL PROTECTED] wrote: I have been using REReplace to find key words or group of words within paragraphs and if found to replace those with an HREF

RE: Using reReplace Backreference as StructKey or Argument

2007-11-16 Thread Ben Nadel
MX7 Developer www.bennadel.com Need ColdFusion Help? www.bennadel.com/ask-ben/ -Original Message- From: Jon Clausen [mailto:[EMAIL PROTECTED] Sent: Thursday, November 15, 2007 8:17 PM To: CF-Talk Subject: Re: Using reReplace Backreference as StructKey or Argument Ben, Thanks

Re: Using reReplace Backreference as StructKey or Argument

2007-11-16 Thread Jon Clausen
Ben, Agreed, the Len/Pos array loops are ugly and a pain to deal with. Hence my attempts to bypass all of that by finding a way to pass the backreference directly in reReplace... :-) Got around to running timers comparing reFind and your reMatchGroups function against each other

RE: Using reReplace Backreference as StructKey or Argument

2007-11-16 Thread Ben Nadel
reReplace Backreference as StructKey or Argument Ben, Agreed, the Len/Pos array loops are ugly and a pain to deal with. Hence my attempts to bypass all of that by finding a way to pass the backreference directly in reReplace... :-) Got around to running timers comparing reFind and your

RE: Using reReplace Backreference as StructKey or Argument

2007-11-15 Thread Ben Nadel
Jon, You cannot do that because the arguments of the REReplace() method are eveluated at the initial method execution time. Back references within a string are fine because they are evaluated within the inner working of the RERepalce() method. However, you cannot use them as part of another

Re: Using reReplace Backreference as StructKey or Argument

2007-11-15 Thread Ben Doom
far. For now I've written the code out using a loop with reFind(), returning subexpressions, mid(), etc. but it seems to me there should be a way to do this using reReplace() and pass the backreference as an argument/key. Usage of evaluate() would probably be a deal-breaker since

Re: Using reReplace Backreference as StructKey or Argument

2007-11-15 Thread Jon Clausen
that because the arguments of the REReplace() method are eveluated at the initial method execution time. Back references within a string are fine because they are evaluated within the inner working of the RERepalce() method. However, you cannot use them as part of another structure (ie, struct

Re: Using reReplace Backreference as StructKey or Argument

2007-11-15 Thread Jon Clausen
(), etc. but it seems to me there should be a way to do this using reReplace() and pass the backreference as an argument/key. Usage of evaluate() would probably be a deal-breaker since it would be less expensive to perform the loop. Here's examples of what i'm trying to do: !--- Trying

Using reReplace Backreference as StructKey or Argument

2007-11-14 Thread Jon Clausen
(), returning subexpressions, mid(), etc. but it seems to me there should be a way to do this using reReplace() and pass the backreference as an argument/key. Usage of evaluate() would probably be a deal-breaker since it would be less expensive to perform the loop. Here's examples of what i'm trying

ReReplace

2007-05-04 Thread Robert Rawlins - Think Blue
I'm trying to replace the .jpg file extension on in a string with .gif and using the following regex. cfset LOCAL.New = 'D:\MediaStore\' REReplace(ARGUMENTS.File, '.jpg', '.gif', 'ALL') / ARGUMENTS.File is a string that looks like 'myfile.jpg' Am I missing something here? Thanks

Re: ReReplace

2007-05-04 Thread Adrian
Not sure why you're using ReReplace, just use Replace. Characters like . have special meanings in ReReplace. On 04/05/07, Robert Rawlins - Think Blue [EMAIL PROTECTED] wrote: I'm trying to replace the .jpg file extension on in a string with .gif and using the following regex. cfset

RE: ReReplace

2007-05-04 Thread Robert Rawlins - Think Blue
Thanks Adrian, Its working fine now. Rob -Original Message- From: Adrian [mailto:[EMAIL PROTECTED] Sent: 04 May 2007 16:01 To: CF-Talk Subject: Re: ReReplace Not sure why you're using ReReplace, just use Replace. Characters like . have special meanings in ReReplace. On 04/05/07

Re: ReReplace

2007-05-04 Thread morgan lindley
I think you want Replace(), not ReReplace(). ReReplace is trying to use a RegEx to make the replacement, Replace will do the straight text match/replace. I'm trying to replace the .jpg file extension on in a string with .gif and using the following regex. cfset LOCAL.New = 'D:\MediaStore

Re: regex question in rereplace

2007-03-29 Thread Ben Doom
(literally, journal, book etc.) in some cases it can contain a slash (/) or a semicolon. What I need to do within the REReplace is find every instance of a slash or a semicolon and put a space before it and a space after it.. Thanks sas Scott Stewart ColdFusion

regex question in rereplace

2007-03-28 Thread Scott Stewart
I’ve got a variable which is a document descriptor (literally, journal, book etc.) in some cases it can contain a slash (/) or a semicolon. What I need to do within the REReplace is find every instance of a slash or a semicolon and put a space before it and a space after it.. Thanks sas

Re: regex question in rereplace

2007-03-28 Thread Jacob Munson
This should work: reReplace(myVar,([;/]), \1 ,all) It uses a technique called back references, which allows you to use the strings that match the regex in your replacement string (that's what the \1 is). On 3/28/07, Scott Stewart [EMAIL PROTECTED] wrote: I've got a variable which is a document

in REREPLACE ) works but not (

2006-12-20 Thread paul zanini
I cannot findout why this works: cfset Form.City1 = rereplace(Form.City1,),( , all) and this does not: cfset Form.City1 = rereplace(Form.City1,(,( , all) the problem is when the string to be replaced is ( or chr(40). The character replacing it can be ( or ( it does not matter, it would work

RE: in REREPLACE ) works but not (

2006-12-20 Thread Ben Nadel
Probably because ( is a reserved character for GROUPS in regular expression. Try escaping: cfset Form.City1 = rereplace( Form.City1, \(, ( , all ) Notice the \ before the ( .. Ben Nadel Certified Advanced ColdFusion MX7 Developer

RE: in REREPLACE ) works but not (

2006-12-20 Thread Steve Brownlee
Because regular expression parsers see '(' as the beginning of a regex group whereas ')' is evaluated literally. You'll need to escape the opening parenthesis. cfset Form.City1 = rereplace(Form.City1,\(,( , all) Steve Brownlee http://www.fusioncube.net/ -Original Message- From

Re: in REREPLACE ) works but not (

2006-12-20 Thread Adrian
erm, not using a regex, so no need for rereplace? cfset Form.City1 = Replace(Form.City1,(,( , all) On 20/12/06, Ben Nadel [EMAIL PROTECTED] wrote: Probably because ( is a reserved character for GROUPS in regular expression. Try escaping: cfset Form.City1 = rereplace( Form.City1

ReReplace Duh

2006-11-29 Thread Les Mizzell
I don't know why, but I always get a headache when working with ReReplace and RegEx stuff... OK, I need to replace *all* spaces with a +: REReplace (#request.mySTRING#,[[:space:]],+,ALL) That works fine. But ... and there's always a but - I need to replace all commas too. They just need

Re: ReReplace Duh

2006-11-29 Thread Raymond Camden
Change your regex to this [[:space:],] That should work. On 11/29/06, Les Mizzell [EMAIL PROTECTED] wrote: I don't know why, but I always get a headache when working with ReReplace and RegEx stuff... OK, I need to replace *all* spaces with a +: REReplace (#request.mySTRING#,[[:space

Re: ReReplace Duh

2006-11-29 Thread Charlie Griefer
as far as i can tell, it -would- be two rereplace() statements. you're looking to replace two elements with two different elements. it would be different if, let's say you wanted to replace all spaces and commas with a single element (either a space or nothing)...but you're looking to do two

Re: ReReplace Duh

2006-11-29 Thread Raymond Camden
Oh shoot, sorry. I missed the requirement to change spaces to + and commas to nothing. replaceList may work as well. Although you can't use [:space:] in that case. On 11/29/06, Charlie Griefer [EMAIL PROTECTED] wrote: as far as i can tell, it -would- be two rereplace() statements. you're

Re: ReReplace Duh

2006-11-29 Thread Les Mizzell
On 11/29/06, Charlie Griefer [EMAIL PROTECTED] wrote: as far as i can tell, it -would- be two rereplace() statements. I'm not as crazy as I thought then. Yup, using two statements works great... cfset request.noSPACE = REReplace(#mySTRING#,[[:space:]],+,ALL) cfset request.myADDRESS

Re: ReReplace Duh

2006-11-29 Thread Raymond Camden
One tip - your second statement isn't a regex. It would make more sense to just use replace, not rereplace. On 11/29/06, Les Mizzell [EMAIL PROTECTED] wrote: On 11/29/06, Charlie Griefer [EMAIL PROTECTED] wrote: as far as i can tell, it -would- be two rereplace() statements. I'm

Re: Need regular expression in REReplace for email

2006-11-01 Thread Tom Chiverton
On Tuesday 31 October 2006 16:41, Claude Schneegans wrote: Just write proper JavaScript, avoiding the nasty IE hacks and known specifics and it'll run in IE and FF without issue. If you just stick to what's standard, you will not go very far. Well, yes, innerHTML :-) But things like that

Re: Need regular expression in REReplace for email

2006-10-31 Thread Tom Chiverton
On Monday 30 October 2006 15:19, Claude Schneegans wrote: http://www.contentbox.com/claude/REwizard/index.cfm?p=h This product can be used only with Internet Explorer 5.5+ under Windows. Pfft. delete -- Tom Chiverton Helping to preemptively disseminate killer technologies

Re: Need regular expression in REReplace for email

2006-10-31 Thread Claude Schneegans
Just write proper JavaScript, avoiding the nasty IE hacks and known specifics and it'll run in IE and FF without issue. If you just stick to what's standard, you will not go very far. I do not use much Javascript in the public parts of my sites, si I can easily keep it compatible. But in the

Re: Need regular expression in REReplace for email

2006-10-31 Thread Charlie Griefer
On 10/31/06, Claude Schneegans [EMAIL PROTECTED] wrote: This product can be used only with Internet Explorer 5.5+ under Windows. Sorry about that. When I started this project, FireFox didn't even exist. Although the Javascipt code used in the REwizard is fairly complex, I'll be glad to

Re: Need regular expression in REReplace for email

2006-10-31 Thread Claude Schneegans
This product can be used only with Internet Explorer 5.5+ under Windows. Sorry about that. When I started this project, FireFox didn't even exist. Although the Javascipt code used in the REwizard is fairly complex, I'll be glad to update it for FF,... when they publish a decent docs about all

Re: Need regular expression in REReplace for email

2006-10-31 Thread Tom Chiverton
On Tuesday 31 October 2006 15:47, Claude Schneegans wrote: I'll be glad to update it for FF,... when they publish a decent docs about all features, Why bother* ? Just write proper JavaScript, avoiding the nasty IE hacks and known specifics and it'll run in IE and FF without issue. If a

Need regular expression in REReplace for email

2006-10-30 Thread Karl
I need to take any email address and transform it with a regular expression in a REReplace so that everything after the @ and before the FINAL period is replaced by the same number of asterisks as there are characters being replaced. So for example: [EMAIL PROTECTED] = [EMAIL PROTECTED

Re: Need regular expression in REReplace for email

2006-10-30 Thread RichL
, Karl [EMAIL PROTECTED] wrote: I need to take any email address and transform it with a regular expression in a REReplace so that everything after the @ and before the FINAL period is replaced by the same number of asterisks as there are characters being replaced. So for example: [EMAIL

Re: Need regular expression in REReplace for email

2006-10-30 Thread Bobby Heath
and transform it with a regular expression in a REReplace so that everything after the @ and before the FINAL period is replaced by the same number of asterisks as there are characters being replaced. So for example: [EMAIL PROTECTED] = [EMAIL PROTECTED] [EMAIL PROTECTED] = [EMAIL

Re: Need regular expression in REReplace for email

2006-10-30 Thread Claude Schneegans
I work with a gentleman here, Adam Presley, who wrote a pretty good app for constructing and testing regular expressions. I consider myself also as a gentleman, and I have such an application in CF online here : http://www.contentbox.com/claude/REwizard/index.cfm?p=h --

RE: Need regular expression in REReplace for email

2006-10-30 Thread Bobby Hartsfield
, 2006 10:19 AM To: CF-Talk Subject: Re: Need regular expression in REReplace for email I work with a gentleman here, Adam Presley, who wrote a pretty good app for constructing and testing regular expressions. I consider myself also as a gentleman, and I have such an application in CF online here

RE: Need regular expression in REReplace for email

2006-10-30 Thread Bobby Hartsfield
maskedemail; } /cfscript cfoutput#maskemail('[EMAIL PROTECTED]')#/cfoutput and this one actually uses the variables I set hehe -Original Message- From: RichL [mailto:[EMAIL PROTECTED] Sent: Monday, October 30, 2006 8:39 AM To: CF-Talk Subject: Re: Need regular expression in REReplace

RE: REReplace

2005-12-01 Thread Ben Nadel
Message- From: Mike | NZSolutions Ltd [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 30, 2005 10:59 PM To: CF-Talk Subject: REReplace Hi there, I wish to remove the img tags from an article for email purposes. I have... cfset mail_content = REReplaceNoCase(arguments.body, (img

REReplace

2005-11-30 Thread Mike | NZSolutions Ltd
Hi there, I wish to remove the img tags from an article for email purposes. I have... cfset mail_content = REReplaceNoCase(arguments.body, (img [^]+), Image removed - please log into website to view, all) However, this doesn't seem to be working ?? mike

Re: ReReplace Strange Crap in mySQL Text Field

2005-11-10 Thread Les Mizzell
Barney Boisvert wrote: REreplace is a CF function, not a MySQL function, which is why you're getting the error. MySQL has a 'replace' function though. Something like this should work: UPDATE myDATE SET textfield = replace(textfield, Õ,') That gives a syntax error as well. MySQL

Re: ReReplace Strange Crap in mySQL Text Field

2005-11-10 Thread Les Mizzell
OK, running the below directly in the database worked fine. UPDATE `textfield` SET `Logline` = REPLACE(`textfield`,Õ,') Can't get an equilivent Coldfusion query to work though. Ideas? -- --- Les Mizzell ~| Find

Re: ReReplace Strange Crap in mySQL Text Field

2005-11-10 Thread Claude Schneegans
textfield = replace(textfield, 'Õ',''') That errors as well You cannot use the same character (single quote) as a string and its delimiter in the same time. Check wih the MySQL syntax for escaping single quotes. Then you probabily need to use the preserveSingleQuotes() function in the

ReReplace Strange Crap in mySQL Text Field

2005-11-09 Thread Les Mizzell
I've been handed a mySQL database with weird stuff in some text fields: Õ instead of ' - for example or things like ÒSet For LifeÓ for left and right quotes I'd like to run a query and remove all these using rereplace, but a test query like the below is returning an error cfloop query=myQUERY

Re: ReReplace Strange Crap in mySQL Text Field

2005-11-09 Thread Barney Boisvert
REreplace is a CF function, not a MySQL function, which is why you're getting the error. MySQL has a 'replace' function though. Something like this should work: UPDATE myDATE SET textfield = replace(textfield, Õ,') Rip out part of the table into a temp table to test against so you can ensure

RE: Replace or REReplace function question.

2005-08-26 Thread Andy McShane
example code for doing it better? -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: 25 August 2005 18:15 To: CF-Talk Subject: Re: Replace or REReplace function question. First, I'd recommend not using CF markup for the fields. Or at least don't require the CFOUTPUT

Replace or REReplace function question.

2005-08-25 Thread Andy Mcshane
Hi all, I am trying to come up with a way to do the following; User creates/edits a basic letter/mailshot document on line using FCKeditor. Within this document the user can add some pre-defined CF output fields i.e. cfoutput#details.firstname#/cfoutput. This is with the idea of trying to do a

RE: Replace or REReplace function question.

2005-08-25 Thread Snake
] Sent: 25 August 2005 14:37 To: CF-Talk Subject: Replace or REReplace function question. Hi all, I am trying to come up with a way to do the following; User creates/edits a basic letter/mailshot document on line using FCKeditor. Within this document the user can add some pre-defined CF output

Re: Replace or REReplace function question.

2005-08-25 Thread Barney Boisvert
First, I'd recommend not using CF markup for the fields. Or at least don't require the CFOUTPUT tags, just the hashes. If you have a small number of fields, loop over them and just do a replace(string, ##detail.firstname##, detail.firstname, all) for each one. Not real elegant, but it is

Re: Replace or REReplace function question.

2005-08-25 Thread Claude Schneegans
Does anyone have any suggestions/ideas on the best way to replace my tags with the required text? Have a look at CF_REextract here: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf It will allow you to get in a query all occurrences of CFOUTPUT/CFOUTPUT tags and

Re: reReplace()

2004-12-14 Thread Tony Weeg
thank you pascal... although, im not sure if im even going to travel down the path i was originally thinking on this one... either way, THANKS! -- tony Tony Weeg macromedia certified coldfusion mx developer email: tonyweeg [at] gmail [dot] com blog: http://www.revolutionwebdesign.com/blog/

RE: reReplace()

2004-12-14 Thread Pascal Peters
If you want to delete cr/lf: REReplace(str,\r?\n,,all) This is CFMX only (this should take care of cr/lf on windows AND lf on *nix). I never used a Mac, but if I understood correctly, \n will take care of cr on a Mac. For CF5, use #chr(13)#?#chr(10)# (this won't take care of mac, although I

reReplace()

2004-12-13 Thread Tony Weeg
hi there. i need to remove all carriage returns and white space from the contents of a cfsavecontent. one problem. however, there are some *good* #Chr(13)##Chr(10)# that i want to keep. so, what i was thinking, is to put something like #Chr(0)# at each *good* spot then after i replace all

Re: reReplace()

2004-12-13 Thread Tony Weeg
so this reads: reReplace(string,'#chr(10)#|#chr(13)#|#chr(32)#','','all' replace all 10's 13's and 32's regardless of anything is there a way to say, dont remove where you find a (couplet) #chr(10)##chr(13)# just where you find either that arent together? -- tony Tony Weeg macromedia

  1   2   3   >