Yes, but if you write it out then it summons Luficer, or Adam's housecat or the ghosts of long gone Hannah-Barbera characters. What's worse, the spell to make them go away is to write out the regex that matches everything except element names.
Seriously, yes, if you can create a DFA to do it, you can write it as a regex.
View all comments
Show parent comment
6
u/unipleb Mar 20 '24
Now I'm wondering if it's possible to check if a string matches elements in the periodic table using one big regex