To Generate a sample strng from reg exp

"Sudhir\(O\)" <[email protected]> Fri, 11 Jul 2003 20:23:30 -0700
Newsgroups gmane.comp.jakarta.regexp.user
Message-ID <[email protected]>
Hi all,
I have a weird requirement for a live project.
I have a regular expression. Now I am supposed to 
generate a sample string which conforms to that
regular expression.
For example if "s*" is the input, it should emit
s1 or anything preceded by s. 
Any ideas how to do it?

Thanks
sudhir