Re: clojure.spec to match string

2016-09-30 Thread Serzh Nechyporchuk
Thanks for all. I will look at your suggestions. > On Sep 29, 2016, at 20:59, lvh <_...@lvh.io> wrote: > >> >> On Sep 29, 2016, at 11:42 AM, Sean Corfield > > wrote: >> >> The test.chuck library from Gary Fredericks has a generator for regex >>

Re: clojure.spec to match string

2016-09-29 Thread lvh
> On Sep 29, 2016, at 11:42 AM, Sean Corfield wrote: > > The test.chuck library from Gary Fredericks has a generator for regex strings > that works pretty well. Whenever I get some time (not soon, if my inbox is anything to go by), I’ll add the equivalent part to schpec.

Re: clojure.spec to match string

2016-09-29 Thread Sean Corfield
The test.chuck library from Gary Fredericks has a generator for regex strings that works pretty well. Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood On 9/29/16, 7:20

Re: clojure.spec to match string

2016-09-29 Thread Serzh Nechyporchuk
Thank you Alex. That’s true, I can use just predicate to validate string. But I want a little more from this. I really want to use generators and conforming. I know that strings are seqable, s/cat works with seq. So my question is: Are there any way to combine this? > On Sep 29, 2016, at

clojure.spec to match string

2016-09-29 Thread Alex Miller
You can make a predicate using re-matches - there is an email example in http://clojure.org/guides/spec -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members

clojure.spec to match string

2016-09-29 Thread Serzh Nechyporchuk
Hello to everyone. Are there any ability to use specs to match string, something like standard regex? For example, I have a function that takes a specially constructed string as parameter: (defn parse-something [s] ...) ;; s => "a=1; b=2; c=3" It would be nice doing this, because I be able