Comment on Fediverse Social Media Guide
flamingos@feddit.uk 6 days agoLooks correct, but boring as you kept it pretty readable, the total opposite of what a regex should be.
^(?:(?:feddit\.(?:i[te]|uk|org|de|nl))|(?:lemm(?:\.ee|y\.(?:ca(?:fe)?|ml|(?:sdf\.)?org|world|zip|nz|blahaj\.zone|dbzer0\.com)))|(?:sh\.itjust\.works|programming\.dev|sopuli\.xyz|jlai\.lu|aussie\.zone|beehaw\.org|slrpnk\.net))$
Now this is getting there, but to make a real regex, we need to go to Emacs’ syntax:
"^\\(?:\\(?:feddit\\.\\(?:i[te]\\|uk\\|org\\|de\\|nl\\)\\)\\|\\(?:lemm\\(\\.ee\\|y\\.\\(ca\\(?:fe\\)?\\|ml\\|\\(?:sdf\\.\\)org\\|world\\|zip\\|nz\\|blahaj\\.zone\\|dbzer0\\.com?\\)\\)\\)\\|\\(?:sh\\.itjust\\.works\\|sopuli.xyz\\|jlai\\.lu\\|aussie\\.zone\\|beehaw.org\\|slrpnk\\.net\\)\\)$"
I am a weirdo who actually like regex
Irelephant@lemm.ee 6 days ago
That is fucked up and its annoying that it works
JcbAzPx@lemmy.world 6 days ago
Regex in a nutshell.