clojure-spec

About: http://clojure.org/about/spec Guide: http://clojure.org/guides/spec API: https://clojure.github.io/spec.alpha/clojure.spec.alpha-api.html
Usman 2021-06-24T19:12:51.129500Z

Hi all, How would I go about creating random URLs that begin with https:// using spec? I'm new to clojure and spec so any support/explanations will be much appreciated. :)

seancorfield 2021-06-24T19:49:28.130200Z

@usman.jamil I'd probably use a string regex and gfrederick's test.chuck lib which has a generator for regexes.

1👍
alexmiller 2021-06-24T19:49:53.130600Z

https://github.com/gfredericks/test.chuck#string-from-regex

1👍
alexmiller 2021-06-24T19:49:57.130900Z

and ditto

Usman 2021-06-24T19:52:11.132800Z

Thanks. I will have a look at that.