now I'm pondering how one could write a program that, given a regular expression, automatically generates a (possibly infinite) list of all strings that are matched by that regex

feel free to reply with your favorite programming languages

@typhlosion brute force: loop over all strings, print out only those that match the regex

@blackle i mean you're right but this is against the spirit in which the question was asked

@typhlosion actually you _might_ be able to generate a context free grammar based on a regular expression, then use that

@blackle yeah that could be one way to do it

i'll think about it, this might be fun to experiment with - with what i'm good at it'd be fairly straightforward in an imperative language but i'd like to figure out how to do it in haskell

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!