Files
S.P.L.U.R.T-Station-13/code/_globalvars/regexes.dm
CitadelStationBot 4f3115cfbe [MIRROR] Play Internet Sound sanity checks (#5918)
* Play Internet Sound sanity checks (#36080)

* Play Internet Sound sanity checks

Now checks if the content URL uses http(s) before playing

* HTML is not HTTP: renames regex

* Converted global regexes to procs that return them

* Revert "Converted global regexes to procs that return them"

This reverts commit 2eedbd6982b0c4de943a72c94f92f9d75001c06e.

* Play Internet Sound sanity checks
2018-03-12 07:04:43 -05:00

8 lines
510 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"))