[Date Index] [Thread Index] [Author Index]
Re: String substitution system
Sure: In:= StringReplace["ABCXCDBXCBDXXBD", "X" ~~ Y_ :> Y ~~ "Z"] (note the :> instead of the ->) Out= "ABCCZDBCZBDXZBD" Cheers -- Sjoerd On Mar 11, 12:08 pm, Hauke Reddmann <fc3a... at uni-hamburg.de> wrote: > THX for the answers. While I'm at it anyway, > is it still that easy when I need substitution rules > with placeholders? E.g. XY->YZ for fixed X,Z > but any string Y? > > -- > Hauke Reddmann <:-EX8 fc3a... at uni-hamburg.de > Nur Schufte schuften - Genie genie=DFt.