4

Is there an inverse function to CharacterName? For example, CharacterName["ε"] gives "CurlyEpsilon". I'm looking for a function to do the reverse, given "CurlyEpsilon", output "ε". The best I could come up with was ToString[ToExpression[ "\[" <> # <> "]" ]]&, but I feel there must be a better way.

1 Answers1

-2

Just put FullForm in front to go one way:

FullForm[ε]

(* \[Epsilon] *)

and \[Epsilon]

to go the other

(* ε *)

David G. Stork
  • 41,180
  • 3
  • 34
  • 96
  • 2
    That's not what OP asks. The "better" way would be using WolframLanguageData or some kind of Entity to extract the symbol from its name. – swish Feb 08 '17 at 22:21