Generator for Regex?

347 views
Skip to first unread message

John Stanford

unread,
Apr 25, 2012, 3:29:15 PM4/25/12
to scala...@googlegroups.com
Hi,

Is there a straight forward way to generate a string based on a regex?

Thanks,
John

Rickard Nilsson

unread,
May 2, 2012, 7:22:50 AM5/2/12
to scala...@googlegroups.com, dcso...@gmail.com
Hi,

I know Daniel Sobral had an implementation that creates a string
generator out of a regex, that we talked about including in ScalaCheck.

@Daniel, how did that work out? Do you have anything I can add to
ScalaCheck?

Regards,
Rickard
> --
> You received this message because you are subscribed to the Google
> Groups "scalacheck" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/scalacheck/-/g8bejRfyRPkJ [1].
> To post to this group, send email to scala...@googlegroups.com.
> To unsubscribe from this group, send email to
> scalacheck+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/scalacheck?hl=en.
>
>
> Links:
> ------
> [1] https://groups.google.com/d/msg/scalacheck/-/g8bejRfyRPkJ

Daniel Sobral

unread,
May 2, 2012, 1:43:34 PM5/2/12
to scala...@googlegroups.com, dcso...@gmail.com
I've answered that. Is it being moderated, or was it lost?


On Wednesday, May 2, 2012 8:22:50 AM UTC-3, Rickard Nilsson wrote:
Hi,

 I know Daniel Sobral had an implementation that creates a string
 generator out of a regex, that we talked about including in ScalaCheck.

 @Daniel, how did that work out? Do you have anything I can add to
 ScalaCheck?

 Regards,
   Rickard

 On Wed, 25 Apr 2012 12:29:15 -0700 (PDT), John Stanford
 <jxsta...@gmail.com> wrote:
> Hi,
>
> Is there a straight forward way to generate a string based on a
> regex?
>
> Thanks,
> John
>
>  --
>  You received this message because you are subscribed to the Google
> Groups "scalacheck" group.
>  To view this discussion on the web visit
> https://groups.google.com/d/msg/scalacheck/-/g8bejRfyRPkJ [1].
>  To post to this group, send email to scala...@googlegroups.com.
>  To unsubscribe from this group, send email to
> scalacheck+unsubscribe@googlegroups.com.

Daniel Sobral

unread,
May 2, 2012, 11:09:48 AM5/2/12
to Rickard Nilsson, scala...@googlegroups.com
My message got bounced because I was not a subscriber to scalacheck,
so I'm replying to myself with it (after subscribing). :-)

On Wed, May 2, 2012 at 11:34 AM, Daniel Sobral <dcso...@gmail.com> wrote:
> Oh, wow, I had completely forgotten about this. I changed jobs and
> haven't had time to do any Scala coding.
>
> I wrote this stuff as part of an (interrupted) project to show Scala
> TDD using various environments (vim, eclipse, intellij, sublime, etc),
> which was stopped short due to various issues on various environments.
>
> The version I have currently preserved has bugs -- most importantly,
> the precedence of "|" is wrong. I probably have a working version
> somewhere, but since I always started it from scratch (that's the
> whole point of TDD exercises, after all), I never updated the git
> repo.
>
> Anyway, it will probably help you, and since the test cases are
> written, it should help you fix whatever is wrong. Here:
> https://github.com/dcsobral/GenRegex. Feel free to fork it, fix it,
> *and* contribute back to scalacheck -- I don't see myself having time
> for that any time soon.
> --
> Daniel C. Sobral
>
> I travel to the future all the time.



--
Daniel C. Sobral

I travel to the future all the time.

Rickard Nilsson

unread,
May 3, 2012, 3:35:29 AM5/3/12
to Daniel Sobral, scala...@googlegroups.com
Thanks Daniel! I'll try to get it in to ScalaCheck.

/ Rickard

On Wed, 2 May 2012 11:34:26 -0300, Daniel Sobral <dcso...@gmail.com>
wrote:
> Oh, wow, I had completely forgotten about this. I changed jobs and
> haven't had time to do any Scala coding.
>
> I wrote this stuff as part of an (interrupted) project to show Scala
> TDD using various environments (vim, eclipse, intellij, sublime,
> etc),
> which was stopped short due to various issues on various
> environments.
>
> The version I have currently preserved has bugs -- most importantly,
> the precedence of "|" is wrong. I probably have a working version
> somewhere, but since I always started it from scratch (that's the
> whole point of TDD exercises, after all), I never updated the git
> repo.
>
> Anyway, it will probably help you, and since the test cases are
> written, it should help you fix whatever is wrong. Here:
> https://github.com/dcsobral/GenRegex. Feel free to fork it, fix it,
> *and* contribute back to scalacheck -- I don't see myself having time
> for that any time soon.
>
>
> On Wed, May 2, 2012 at 8:22 AM, Rickard Nilsson <rick...@gmail.com>
> wrote:

Rickard Nilsson

unread,
May 3, 2012, 3:36:48 AM5/3/12
to scala...@googlegroups.com, dcso...@gmail.com
On Wed, 2 May 2012 10:43:34 -0700 (PDT), Daniel Sobral
<dcso...@gmail.com> wrote:
> I've answered that. Is it being moderated, or was it lost?

It is being moderated. Sorry for the delay.

/ Rickard


> On Wednesday, May 2, 2012 8:22:50 AM UTC-3, Rickard Nilsson wrote:
> Hi,
>
>
> I know Daniel Sobral had an implementation that creates a string
> generator out of a regex, that we talked about including in
> ScalaCheck.
>
> @Daniel, how did that work out? Do you have anything I can add to
> ScalaCheck?
>
> Regards,
> Rickard
>
> On Wed, 25 Apr 2012 12:29:15 -0700 (PDT), John Stanford

Odd Möller

unread,
Nov 7, 2013, 5:23:14 AM11/7/13
to scala...@googlegroups.com, Daniel Sobral
Any progress on this?

Greetings
Odd

leono...@lunatech.com

unread,
Mar 5, 2018, 12:20:27 PM3/5/18
to scalacheck
This would be very interesting!

Will a generator based on regex ever be available?
Reply all
Reply to author
Forward
0 new messages