Re: regex question in rereplace

2007-03-29 Thread Ben Doom
You can certainly do it with a regex, but it might be more efficient to do it with a pair or replace() calls. Regex is inherently expensive. If you want to do it with regex, Jacob's suggestion should work. --Ben Doom Scott Stewart wrote: I’ve got a variable which is a document descriptor

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