Re: Can We Do Sed-Style Regex in 4GL?
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
The REPLACE function (built into SQL) has a small (very small!) subset of sed's capabilities. You could check it out. Here's an example from the manual : In the following example, the user replaces every occurrence of xz in the source string with t. SELECT REPLACE('Mighxzy xzime', 'xz', 't') FROM mytable ; Result : Mighty time Rudy Elisa Roselli wrote: > We have a problem with a program written in Informix 4gl for the purposes of > internationalising the error messages in the modules of our applications. > > What we want to do is a very straightforward text substitution throughout > the modules. Under Unix, using a system call to sed, we got the results we > wanted with a single line of code along the lines > s/regular_expression_to_be_substituted/substitution_string/ . But our > supervisor has just reminded us that we need to stay platform independent. > Should our development environment switch to Windows, system calls to Unix > from within our 4gl application modules could cause problems. > > Our young developer is heartbroken since this is a huge setback in terms of > delivery time. I'm asking on his behalf, and somewhat naively since I know > scarcely any 4gl, if there is any hidden or new function or add-on or > anything in Informix 4gl that allows for this kind of regular expression > substitution from within the language, without any external calls? > > Many thanks for your patience and advice, > > Elisa Roselli > Volume Software > France
Thanks, I've passed your message to the developer and he's looking into it now. Elisa Roselli Rudy Fernandes a 'crit dans le message <38B53124.F7F6B0FE@americasm01.nt.com>... >The REPLACE function (built into SQL) has a small (very small!) subset of >sed's capabilities. You could check it out. Here's an example from the manual :