Hello,

Apologies for making a second regular expressions-related post today, but the topic is new to me and I've struggled to answer my current problem with the info online.

I have the following string values, say, for variable Branching:

Code:
st12a(5)==1 & st13b == 3
st8a(88) == 1
(e1 == 1  | e1 == 2) & e2==0
and I want to convert the (1 or 2-digit) number in the parentheses that may be followed by " ==" or "==" to two underscores and the number without parentheses :

Code:
st12a__5==1 & st13b == 3
st8a__88 == 1
(e1 == 1  | e1 == 2) & e2==0
(notice last value unchanged)


Any help?

Thanks a lot,
Reese

v 14.2