You need to 'remember' the character grabbed by the dot in a backreference:

rereplace(string, "(.)/(.)", "\1 / \2", "all");

That should take care of you.  If you have any more questions, we might
want to move to CF-Regex (available via the HoF archives if you don't
want to subscribe).

--Ben Doom

DURETTE, STEVEN J (AIT) wrote:

> Hi all,
>
>
> Here is a quick one for you.
>
>
> I have a Variable that I am trying to do a rereplace on and it isn't working
> as I expected.
>
>
> Here is the code:
> <cfset Variables.myNewVar = rereplace(Variables.myOldVar,"./.", ". / .",
> "All")>
>
>
> I was hoping that it would convert: DOGS/CATS
> TO: DOGS / CATS
> but it returns: DOG. / .ATS
>
>
> I also tried it with the replacement string being " / " and got: DOG / ATS
>
>
> Can anyone tell me what I need to do to get it to DOGS / CATS
>
>
> Thanks,
> Steve
>
> --
>
> ****COST SAVINGS SUGGESTION*****
> For pages that must be printed, change your print settings to print in
> "grayscale" instead of color.
>
> Steve Durette
> Mgr-Eng. & Const. Systems Support
> (586)466-7654 [OFFICE]
> 100 S. Main
> Room 314
> Mt. Clemens, MI 48043
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to