Comment on Fediverse Social Media Guide

<- View Parent
flamingos@feddit.uk ⁨6⁩ ⁨days⁩ ago

Looks 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

source
Sort:hotnewtop