regular expression

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Gius
Participant
Posts: 29
Joined: Mon Mar 09, 2015 2:10 am

regular expression

Post by Gius »

Hello,
In example , We would like to replace any of the folling word1 with empty

" in this sentence , change all this wordToChange to the string empty "
" in this sentence , change all this -wordToChange- to the string empty "
" in this sentence , change all this ?wordToChange? to the string empty "
" in this sentence , change all this %wordToChange% to the string empty "


with this

" in this sentence , change all this to the string empty "



is it possible to do with

Ereplace ( sentence , [\ \-\?\%] : "wordToChange" : [\ \-\?\%] , " " )


Thank You -
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Short answer? No. You would need a series of function calls to accomplish that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What Craig said, though you can nest the four Ereplace() function calls into a single expression.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply