Hi. I'm trying to make an electron notation maker. If anyone knows Quantum Physics, what I am trying to do is a calculator that displays electron notation as a noble gas notation. For example, Chlorine's electron configuration is 1s2, 2s2, 2p6, 3s2, 3p5. Now, the noble gas before that is Neon.
So basically I want to search my string for:
1s2, 2s2, 2p6
and replace it with:
[Ne]
So then the whole string will go from:
1s2, 2s2, 2p6, 3s2, 3p5