Besides using regex, there's a pretty stilly way of dealing with this.
Replace() all the /public/document.cfm links with just /document.cfm,
then replace all the /document.cfm links with /public/document.cfm
It's a bit absurd, but it's an easy, quick fix that doesn't have to
invoke a regex engine.
--Ben Doom
A.Little wrote:
> Hi all,
>
> I'm trying to write a regular _expression_ and am having a little
> trouble... What I want to do is replace all instances of '/document.cfm'
> in a string with '/public/document.cfm', unless the original substring
> is '/public/document.cfm' - ie I don't want to end up with
> '/public/public/document.cfm'.
>
> This is what I;ve been trying:
> #ReReplace('.open.ac.uk/document.cfm>test','(^public)/document.cfm','/pu
> blic/document.cfm')#
>
> But in this instance it's not finding a match, so not replacing the
> required substring - can anyone give me any pointers as to where I;ve
> gone wrong? I found plenty of examples about Reg Exp generally, but none
> which seem to fit what I'm trying to achieve.
>
> Thanks,
>
> Alex
>
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- [OT] - RegExp Help A.Little
- Re: [OT] - RegExp Help Massimo Foti
- Re: [OT] - RegExp Help Massimo Foti
- Re: [OT] - RegExp Help Ben Doom
- Ben Doom