Retina, (削除) 291 (削除ここまで) (削除) 286 (削除ここまで) 277276 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Prot?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|Pro.a?|[ACEH][bdpt]|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Prot?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|Pro.a?|[ACEH][bdpt]|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) (削除) 286 (削除ここまで) 277 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|Pro.a?|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|Pro.a?|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) (削除) 286 (削除ここまで) 276 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Prot?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Prot?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) 286(削除) 286 (削除ここまで) 277 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|N[ei]o?[bdpt]|Pla|Pla?|Rado|St|Tha|Unun|Zi).|Pro|Flu|N[ei]o?[bdpt]|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|N[ei]o?[bdpt]|Pla|Pla?|Rado|St|Tha|Unun|Zi).|Pro|Flu|N[ei]o?[bdpt]|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) 286 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) (削除) 286 (削除ここまで) 277 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|Pro.a?|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|[CGP]a.*d|(As|Ch|G|Law|Ma|Me.|Pla?|Rado|St|Tha|Unun|Zi).|Flu|N[ei]o?[bdpt]|Pro.a?|[ACEH].*s|[BDLRST].[bcehmv]|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) 287286 bytes
.*
$u
Pot
K
oppop
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|[CT]h?u.*m|*d|..+r[bkmn]s?||[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|[CT]h?u.*m|*d|..+r[bkmn]s?||[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) 287 bytes
.*
$u
Pot
K
opp
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|[CT]h?u.*m|..+r[bkmn]s?|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|[CT]h?u.*m|..+r[bkmn]s?|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.
Retina, (削除) 291 (削除ここまで) 286 bytes
.*
$u
Pot
K
op
u
Iro
Fe
Silv
Ag
Tin
Sn
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|..+r[bkmn]s?|[CT]h?u.*m|..
\B.*\B
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
So
Na
An
Sb
Tu
W
Go
Au
Mc
Hg
Le
Pb
U.
U$l
Verification script (Python)
Explanation
.*
$u
Convert the first letter of the input to uppercase and the rest to lowercase.
0L`.*f|[RS].*g|Ast|Ch.|Flu|Ge|Lawr|Ma.|Me..|N[ei]o?[bdpt]|Pla?.|Pro.a?|Radon|Str|Thal|Unun.|Zi.|[ACEH].*s|[BDLRST].[bcehmv]|[CGP]a.*d|..+r[bkmn]s?|[CT]h?u.*m|..
Truncate each element name, ending with the intended second letter. The default case .. matches the first two letters of the element name.
\B.*\B
Keep only the first and last letter.
T`l``[FHKNOSVY][at-y]|Cb|Bo|Io|Ph|Ur
Remove the lowercase letters from the single-letter abbreviations.
U.
U$l
Insert the u for the elements that require it.
The rest of the program deals with various special-case replacements. Some of these occur before the main regex because those elements share their first two letters with another.