ACE toDisplay() tester

Enter a chemical formula or technical term and see how ACE converts it for display.
 


 
The Rules
(CH3CO2)4Rh2 becomes (CH3CO2)4Rh2
NH4^+ ^-OH becomes NH4+ OH
(20 cm^^-1) becomes (20 cm–1)
Bu3Sn^. becomes Bu3Sn·
SN1, SN2, and SRN1 become SN1, SN2, and SRN1
but E1 and E2 remain E1 and E2
pKa becomes pKa
1H, 2H, and 13C become 1H, 2H, and 13C
[Use <sup>n</sup>X for other isotopes]
Diels-Alder and Friedel-Crafts become Diels–Alder and Friedel–Crafts
C#tripleC becomes C≡C
#a, #b, #gamma, #delta,
#Delta, #pi, and #sigma
become α, β, γ, δ,
Δ, π, and σ
[Use &name; or &Name; for other Greek letters]
#light and #heat become and Δ
&deg;, &rarr;, and &harr; become °, →, and ↔
Visit this page to see other characters that can be displayed with this method.
Standard HTML tags such as <sup>, <sub>, <p>, and <i> may also be used.


For those who want all the gory details, toDisplay() runs replaceAll(x, y) on the submitted string with these values for x and y in this order:

Regular expression Replacement string
Diels-Alder Diels&ndash;Alder
Friedel-Crafts Friedel&ndash;Crafts
(\b)sp(2|3)(\b) $1<i>sp</i><sup>$2</sup>$3
(\b)sp(2|3)d(\b) $1<i>sp</i><sup>$2</sup><i>d</i>$3
(\b)dsp(2|3)(\b) $1<i>dsp</i><sup>$2</sup>$3
(\b)sp(2|3)d(2|3)(\b) $1<i>sp</i><sup>$2</sup><i>d</i><sup>$3</sup>$4
(\b)(?<!'|<)(sp|s|p|d|f)(?!'|>)(\b) $1<i>$2</i>$3
(\b)pKa(\b) $1p<i>K</i><sub>a</sub>$2
(\b)pKb(\b) $1p<i>K</i><sub>b</sub>$2
(\b)SN(1|2)(\b) $1S<sub>N</sub>$2$3
(\b)SRN1(\b) $1S<sub>RN</sub>1$2
(\b)E(1|2)(\b) $1E:::$2$3
(\b)1H(\b) $1<sup>1</sup>H$2
(\b)2H(\b) $1<sup>2</sup>H$2
(\b)13C(\b) $1<sup>13</sup>C$2
R(\d+) [applied to R-group questions only] R<sup>$1</sup>
([A-Za-z\)\]])(\d+) $1<sub>$2</sub>
([^\^])(\^)(\+) $1<sup>$3</sup>
^(\^)(\+) <sup>$2</sup>
([^\^])(\^)(\-) $1<sup>&ndash;</sup>
^(\^)(\-) <sup>&ndash;</sup>
([^\^])(\^)(\.) $1&middot;
^(\^)(\.) &middot;
(\^\^)-(\d+)(\b) <sup>&ndash;$2</sup>$3
(\^\^)(\d+)- <sup>$2&ndash;</sup>
(\^\^)(\S+) <sup>$2</sup>
(\^)
(H|B|C|N|O|F|Al|Si|P|S|Cl|As|Se|Br|Sn|I|Pb|Li|Na|K|Cs|Mg|Zn|Me|Et|Pr|Bu|Ph|Ar|Bn|Bz|Ms|Ts|Tf)-(H|B|C|N|O|F|Al|Si|P|S|Cl|As|Se|Br|Sn|I|Pb|Li|Na|K|Cs|Mg|Zn|Me|Et|Pr|Bu|Ph|Ar|Bn|Bz|Ms|Ts|Tf) $1&ndash;$2
(H|B|C|N|O|F|Al|Si|P|S|Cl|As|Se|Br|Sn|I|Pb|Li|Na|K|Cs|Mg|Zn|Me|Et|Pr|Bu|Ph|Ar|Bn|Bz|Ms|Ts|Tf)\((\d+)\)-(H|B|C|N|O|F|Al|Si|P|S|Cl|As|Se|Br|Sn|I|Pb|Li|Na|K|Cs|Mg|Zn|Me|Et|Pr|Bu|Ph|Ar|Bn|Bz|Ms|Ts|Tf) $1($2)&ndash;$3
\(-\) (&ndash;)
(\b)E:::(1|2)(\b) $1E$2$3
#heat &Delta;
#light <i>h&nu;</i>
#pi &pi;
#a &alpha;
#b &beta;
#sigma &sigma;
#gamma &gamma;
#delta &delta;
#Delta &Delta;
#triple &equiv;


Back to public ACE pages.