Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Substitutions (StringReplace) Problem' topicStudent Support Forum > General > "Substitutions (StringReplace) Problem"

Next Comment >Help | Reply To Topic
Author Comment/Response
David Koslicki
07/23/09 08:53am

Hello,

I'm trying to replace a string (say "aba") with a list of rules but I want to generate all replacements possible. For example:
I want to replace the word "aba" according to the rules {"a"->"ab","a"->"ba","b"->"bb"} and obtain a list of all possibilities: {abbbab,abbbba,babbab,babbab}

Any ideas how to do this efficiently?

Thanks,

~David Koslicki

URL: ,

Subject (listing for 'Substitutions (StringReplace) Problem')
Author Date Posted
Substitutions (StringReplace) Problem David Koslicki 07/23/09 08:53am
Re: Substitutions (StringReplace) Problem yehuda ben-s... 07/26/09 00:54am
Next Comment >Help | Reply To Topic