Files
Citadel-Station-13-RP/code/_globals/regexes.dm
Zandario ed27a01b58 Massive backend updoot: Juke Build, TGUI upgrades, Soft Ping, and too much to list! (#3990)
* Time to become our TGUI God.

* Visually sprucing the copyrights.

These shouldn't be ignored :)

* babababa

* https://github.com/tgstation/tgstation/pull/50422

* dooootdooot

* Holy fuck

Updates the tools folder
Updates our build tooling
Updates TGUI MASSIVELY
I'm going to go scream in a hole now

* ??

* Was it this dum thing?

* orrrr

* It's this isn't it

* Did it manually

* hubah

* TGUI Changelog

* oops

* What if I use the original?

* Lets try this again

* Shit commenting out for now

* asdasd

* Fuck it use the old one and remember to replace later

* Updates yarn.lock

* Lets try something horrid

* Nope it HATES THAT

* fucc

* The great eslinting

* HOLY SHIT

* Final?

* ?

* asd

tgstation/tgstation/pull/59914
tgstation/tgstation/pull/66317

* Improved Asset handling.

* Oops

* Subsystem stuff

* Recompiles the Changelong again.

* Finally Fixed Communicators

* Compiled Changelogs... AGAIN
2022-05-09 18:02:09 -07:00

20 lines
1.2 KiB
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"))
GLOBAL_DATUM_INIT(is_color, /regex, regex("^#\[0-9a-fA-F]{6}$"))
//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,})"))
//All < and > characters
GLOBAL_DATUM_INIT(angular_brackets, /regex, regex(@"[<>]", "g"))
//All characters forbidden by filenames: ", \, \n, \t, /, ?, %, *, :, |, <, >, ..
GLOBAL_DATUM_INIT(filename_forbidden_chars, /regex, regex(@{""|[\\\n\t/?%*:|<>]|\.\."}, "g"))
GLOBAL_PROTECT(filename_forbidden_chars)
// had to use the OR operator for quotes instead of putting them in the character class because it breaks the syntax highlighting otherwise.