Re: Regex Question: All punct except...

2004-08-20 Thread Ben Doom
Alistair Davidson wrote: > One solution I've used before in vaguely similar situations is to > replace the / character with a placeholder, do the nice clean reg ex, > then put the slashes back: > but : > -  you have to choose a placeholder that's never going to appear > in your input string

RE: Regex Question: All punct except...

2004-08-20 Thread Alistair Davidson
One solution I've used before in vaguely similar situations is to replace the / character with a placeholder, do the nice clean reg ex, then put the slashes back: myString = replace( myString, "/", "PLACEHOLDER", "ALL" ); myString = REReplace( myString, "[[:punct:]]", "", "ALL" ); myString = Rep

Re: Regex Question: All punct except...

2004-08-19 Thread Patricia Lee
Thanks for the repy and for the advice.  Not my strong suit, regex is. -P > I can't think of a clean way to use the punct class. > > However, I will state that writing out the chars you *do* want to > replace in a class is going to run faster than what you have.  On the > other hand, it's annoyin

Re: Regex Question: All punct except...

2004-08-19 Thread Ben Doom
I can't think of a clean way to use the punct class. However, I will state that writing out the chars you *do* want to replace in a class is going to run faster than what you have.  On the other hand, it's annoying to write.  :-) --Ben Patricia Lee wrote: > I want a CF regex to replace all pu