Generate string from W3C regex

Hello,

is anyone aware of an Erlang library which allows one to generate
strings which would match a given w3c regex?

Best regards, Kristian

2 Likes

Hello,

AFAIK no. Can you explain your use case in more detail? Maybe there are other solutions. Do you need this for some mock/test data? Is w3c regex a must?

1 Like

More specifially, I need to generate strings from regular expressions of this definition: XML Schema Part 2: Datatypes Second Edition

Yes I want to generate test data.

Currently, I use something like:

os:cmd("exrex -d '' -r '" ++ RE ++ "'");

But it would obviously be nice not having to leave the BEAM :slight_smile:

1 Like