on 17/11/00 6:22 AM, David Cummins at [EMAIL PROTECTED] wrote:
Firstly, I'm pretty sure you don't need to escape a space.
Secondly, no question mark is required, because I want to replace exactly one
character followed by exactly one space with just the character.
And thirdly, you don't
Hello all
I have a page of text that looks like this...
H e l l o A l l
I want to condense it to...
Hello All (getting rid of one space following every character)
I know I can do it with regEx in studio replace pane...
but I don't know the syntax...
Anyone, Anyone, Beuhler???
TIA
jp
I think it goes like this:
cfset blah=REReplace(blah,"(.) ","\1","ALL")
Where "." is any character, the brackets denote grouping as a subexpression, and
"\1" is a backreference to that subexpression.
David Cummins
j p wrote:
Hello all
I have a page of text that looks like this...
H e
rereplace("#text#"," ","","ALL")
"j p" [EMAIL PROTECTED] wrote:
Hello all
I have a page of text that looks like this...
H e l l o A l l
I want to condense it to...
Hello All (getting rid of one space following every character)
I know I can do it with regEx in studio replace pane...
but I
j p [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 16 November 2000 07:42
To: CF-Talk
Subject: RegEx help PLEASE hurry...
Hello all
I have a page of text that looks like this...
H e l l o A l l
I want to condense it to...
Hello All (getting rid of one space following every character)
: RegEx help PLEASE hurry...
Hello all
I have a page of text that looks like this...
H e l l o A l l
I want to condense it to...
Hello All (getting rid of one space following every character)
I know I can do it with regEx in studio replace pane...
but I don't know the syntax
That's a bit too hardcore, it will become "Helloall"... what about my earlier
suggestion?
David Cummins
Alex wrote:
rereplace("#text#"," ","","ALL")
"j p" [EMAIL PROTECTED] wrote:
Hello all
I have a page of text that looks like this...
H e l l o A l l
I want to condense it
Try this:
Find:
(.)
there's a space on the end of that!!, like "(.) "
Replace with:
\1
Make sure you check the Regular Expressions checkbox.
Best of luck,
Lee (Bjork) Borkman
http://bjork.net ColdFusion Tags by Bjork
IMPORTANT NOTICE:
This e-mail and any attachment to it is intended only
on 11/16/00 10:50 AM, David Cummins at [EMAIL PROTECTED] wrote:
cfset blah=REReplace(blah,"(.) ","\1","ALL")
This is the regExp syntax, but you would need to use this regexp to do the
job properly:
cfset blah=REReplace(blah,"([^\ .]?\ ?)\ ","\1","ALL")
--
Rob Keniger
big bang solutions
Guys,
It looks like my previous message didn't make it.
JP was looking for a STUDIO solution. Here it is.
Use Extended Replace.
Find:
"(.) " without the quotes
Replace with:
\1
Don't forget to check the Regular Expressions checkbox.
have fun,
Lee Borkman
Senior Web Development Officer
Doh! Try
REPLACE
([a-z ])[ ]
WITH
\1
Remember to check RegEx.
Jason Powers
Fig Leaf Software
202-797-5440
-Original Message-
From: j p [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 15, 2000 3:42 PM
To: CF-Talk
Subject: RegEx
REreplacenocase("([a-z ])[ ]","\1","ALL")
Jason Powers
Fig Leaf Software
202-797-5440
-Original Message-
From: j p [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 15, 2000 3:42 PM
To: CF-Talk
Su
My copy of Mastering Regular Expressions is on its way, but for now can
anyone help with the following?
Given a string such as "sometext[othertext[finaltext] - maybemoretext[]]", I
want to return both "sometext", and the contents of the outer "[ ]".
Any suggestions on how to do nested regexes
at, mainly 'cause
it's easier for me to visualize.
Steve
-Original Message-
From: Dan Haley [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 13, 2000 4:13 PM
To: '[EMAIL PROTECTED]'
Subject: regex help
My copy of Mastering Regular Expressions is on its way, but for now can
a
601 - 614 of 614 matches
Mail list logo