Is Valid URL Block

This would be a simple block that takes a string and outputs a boolean that is true if the provided string is a valid well formed URL or false if the provided string is not a URL.

This would be useful when creating configuration within discord and would be much more reliable than regex as these often still match strings that follow URL structure but do not end with a valid TLD (while regex that does enforce this could be written it makes the regex quite lengthy and regex is not fast at the best of times)

2 Likes

Good idea, might also be useful to output the matched TLD since obtaining that on your own is tricky.

2 Likes