https://github.com/crdoconnor/xeger
Library to generate random strings from regular expressions.
https://github.com/crdoconnor/xeger
expressions python regexp regular
Last synced: 10 months ago
JSON representation
Library to generate random strings from regular expressions.
- Host: GitHub
- URL: https://github.com/crdoconnor/xeger
- Owner: crdoconnor
- License: other
- Created: 2015-02-16T13:11:38.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2023-08-30T13:10:23.000Z (over 2 years ago)
- Last Synced: 2025-04-04T14:04:54.204Z (10 months ago)
- Topics: expressions, python, regexp, regular
- Language: Python
- Size: 23.4 KB
- Stars: 128
- Watchers: 5
- Forks: 21
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.txt
Awesome Lists containing this project
README
.. image:: https://travis-ci.org/crdoconnor/xeger.svg?branch=master
:target: https://travis-ci.org/crdoconnor/xeger
Xeger
=====
Library to generate random strings from regular expressions.
To install, type:
::
pip install xeger
To use, type:
>>> from xeger import Xeger
>>> x = Xeger(limit=10) # default limit = 10
>>> x.xeger("/json/([0-9]+)")
u'/json/15062213'
About
=====
Code adapted and refactored from the Python library
`rstr by Leapfrog Online `_ (now iProspect),
in turn inspired by the Java library `Xeger `_.