Quantcast
Viewing all articles
Browse latest Browse all 186

StringReplace with several replacement rules doesn't work as expected

I understand that, according to WL documentation, StringReplace["16.",{aux:NumberString:>"1/"<>aux,".":>"*3/2"}] should produce "1/16*3/2" but instead it produces "1/16.".

If programmed with two StringReplace:StringReplace[StringReplace["16.",aux:NumberString:>"1/"<>aux],".":>"*3/2"]it produces the right answer: "1/16*3/2".

What's wrong with the first approach?

Thankyou!!!


Viewing all articles
Browse latest Browse all 186

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>