# How to rationalize real number in string?

Considering we have:

in = "F 18/10"


How can I make this to be:

Thanks!

• You want the output to be a String too, correct? Jul 16 '15 at 9:54

StringReplace[in,
"\!$$\*FractionBox[\(" ~~ d1 ~~ "$$, $$" ~~ d2 ~~ "$$]\)"]