From: Pierre-Charles David Date: 2001-11-29T18:02:56+09:00 Subject: [ruby-talk:26879] Re: Anyone know of a Regexp pattern random string generator? >>>>> "Ross" == Ross Shaw writes: Ross> "Mark Hahn" wrote in message >> Does it have to generate multiple random strings or jast "any" >> string. Generating a single string would be pretty easy. >> Ross> Each call to Regexp#rand should return a random string which Ross> would completely match the Regexp - the next call would Ross> produce a different string. Ross> This is intended to be part of a larger system that given an Ross> XML schema would produce a valid XML file - I am looking at Ross> using this to produce random input test files (and their Ross> expected output files) to test a transformation engine with Ross> a sample of all possible inputs. Ross> Ross I don't really understand why you need/want to use regexps for this... Anyway, there is something similar on IBM's alphaworks site. It's called 'XML Generator' and seems to works with DTDs instead of Schemas, but maybe it could still be useful or give you ideas: "IBM's XML Generator is a Java program that creates test cases for XML applications by generating "random" instances of valid XML from a single document-to-document (DTD) input." The web page is: http://www.alphaworks.ibm.com/tech/xmlgenerator -- Pierre-Charles David (pcdavid emn fr) Computer Science PhD Student, �cole des Mines de Nantes, France Homepage: http://purl.org/net/home/pcdavid