10-30-2015 04:22 AM
Hello,
I have a formula string like this:
mod1.b1+mod1.b11-mod2.b3
Using Search and Replace function (with regular expression), I'd like to replace substring "mod1.b1" with the string "A". Notice that the substring "mod1.b11" should not be replaced with "A".
In other words, the substring "mod1.b1" should be replaced only if it is at the beginning or at the end of the formula, or no number or letter delimit the string.
Thanks all
10-30-2015 05:00 AM
I use this regula expression to replace the string if it is at the end or at the beginning of the string:
^mod1.b1|mod1.b1$
10-30-2015 05:14 AM
It's not possible to search this string "mod1.b1+" and replace this by "StringA+" ?
10-30-2015 07:03 AM
Hi,
I write a little logic, may be this is not solve Your problem fully, but think can help You !!!
With Best Regards
Hrachya
10-30-2015 07:20 AM
10-30-2015 07:27 AM
AC_85 a écrit :
I use this regula expression to replace the string if it is at the end or at the beginning of the string:
^mod1.b1|mod1.b1$
To replace only at beginning or end of the string put a backslash in front of the dot in mod1.b1. In regex a dot match everything so you have to put the escape character \ in front of it if you want to match a dot.
Ben64