word_substitute function
(Shortest import: from brian2.utils.stringtools import word_substitute)
-
brian2.utils.stringtools.word_substitute(expr, substitutions)[source]
Applies a dict of word substitutions.
The dict substitutions
consists of pairs (word, rep)
where each
word word
appearing in expr
is replaced by rep
. Here a ‘word’
means anything matching the regexp \bword\b
.