s/.../.../The obvious Mathematica version of the Perl s/.../.../ substitution operator is StringReplace. The default Perl behavior is to do a single replacement. In[101]:=  |
Out[102]=
|
The /g modifier in Perl does global replacement of all matches. In[103]:=  |
Out[103]=
|
Using the evaluation /e modifier, Perl can use subpatterns as part of the replacement. This is easily done in Mathematica. In[104]:=  |
Out[105]=
|
|