Files
Bubberstation/code/_globalvars/regexes.dm
SkyratBot fb51a5166b [MIRROR] [s] send2adminchat now stops links from embedding. (#1563)
* Merge pull request #54757 from Ghommie/Ghommie-tg33

[s] send2adminchat now stops links from embedding.

* [s] send2adminchat now stops links from embedding.

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2020-11-04 00:34:30 +00:00

11 lines
687 B
Plaintext

//These are a bunch of regex datums for use /((any|every|no|some|head|foot)where(wolf)?\sand\s)+(\.[\.\s]+\s?where\?)?/i
GLOBAL_DATUM_INIT(is_http_protocol, /regex, regex("^https?://"))
GLOBAL_DATUM_INIT(is_website, /regex, regex("http|www.|\[a-z0-9_-]+.(com|org|net|mil|edu)+", "i"))
GLOBAL_DATUM_INIT(is_email, /regex, regex("\[a-z0-9_-]+@\[a-z0-9_-]+.\[a-z0-9_-]+", "i"))
GLOBAL_DATUM_INIT(is_alphanumeric, /regex, regex("\[a-z0-9]+", "i"))
GLOBAL_DATUM_INIT(is_punctuation, /regex, regex("\[.!?]+", "i"))
//finds text strings recognized as links on discord. Mainly used to stop embedding.
GLOBAL_DATUM_INIT(has_discord_embeddable_links, /regex, regex("(https?://\[^\\s|<\]{2,})"))