I am not aware of such a library. If you're interested in writing one yourself, then these are probably the steps you'll need to take:
Write a parser for regular expressions (you may want to start out with a restricted class of regexes).
Use the result to construct an NFA.
(Optional) Convert the NFA to a DFA.
Randomly traverse the resulting automaton from the start state to any accepting state, while storing the characters outputted by every transition.
The result is a word which is accepted by the original regex. For more, see e.g. Converting a Regular Expression into a Deterministic Finite Automaton.