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
(R1)2NCOR2 becomes (R1)2NCOR2
     when a question uses R groups; otherwise, it becomes (R1)2NCOR2
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
13C becomes 13C
1H NMR becomes 1H NMR
but 1H not followed by NMR remains 1H not followed by NMR
although ^1H, ^2H, and ^56Fe become 1H, 2H, and 56Fe
Diels-Alder and Friedel-Crafts become Diels–Alder and Friedel–Crafts
C-O and Si-H bonds become C–O and Si–H bonds
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 Δ
°, →, and ↔ 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) $1sp<sup>$2</sup>$3
(\b)sp(2|3)d(\b) $1sp<sup>$2</sup>d$3
(\b)dsp(2|3)(\b) $1<i>dsp</i><sup>$2</sup>$3
(\b)sp(2|3)d(2|3)(\b) $1sp<sup>$2</sup>d<sup>$3</sup>$4
(\b)(?<!<i>)sp(\b) $1<i>sp</i>$2
(\b|\b\d)(?<!')(s|p|d|f)(\s)orbital $1<i>$2</i>$3orbital
(\b)(P|p)(K|k)(a|b)(\b) $1p<i>K</i><sub>$4</sub>$5
(\b)(S|s)(N|n)(1|2)(\b) $1S<sub>N</sub>$4$5
(\b)(S|s)(R|r)(N|n)1(\b) $1S<sub>RN</sub>1$5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