I have about 1000 variable names. Four example are:
DPI[1]
PXAC[a, c]
TRANS
PDS[c]
I like to insert 0 in a specific position in the given variable names such as:
DPI0[1]
PXAC0[a, c]
TRANS0
PDS0[c]
I searched for solutions from the already asked questions, but could not find any. Normal insertion codes in this forum do not help me because in my case the insertion should be as shown above.
Two rules should be applied:
- insertion should always be before this
[. - for those variable names without
[...], the insertion should be at the end of the word.
Thanks.
codethat you have written a few months ago). Since my variables are associated with some model definitions, the currentcodedoes not work. I usedClearAll[ list ]to clean the variable definitions or any assignments butClearAll[...]` is not cleaning anything. Any idea? – Tugrul Temel Apr 30 '20 at 12:36ClearAll["Global`*"]? – kglr Apr 30 '20 at 12:48