Page 1 of 1

regular expression

Posted: Tue Mar 08, 2016 2:55 am
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 -

Posted: Tue Mar 08, 2016 8:53 am
by chulett
Short answer? No. You would need a series of function calls to accomplish that.

Posted: Tue Mar 08, 2016 2:51 pm
by ray.wurlod
What Craig said, though you can nest the four Ereplace() function calls into a single expression.