-
Notifications
You must be signed in to change notification settings - Fork 0
Generate a stream of (roughly) uniform samples from the set of strings matching a regex
License
anrosent/perg
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Regex Sampler --- Simple commandline utility to generate samples uniformly over the space of strings matching a provided regular expression. Useful for spoofing input to programs! ## Example: We can generate a stream of fake JSON data representing people and their emails! ``` $ ./perg.py '{ "name":"(\w+) (\w+)", "email": "\1_\2@\w+.(edu|com|org)"}' { "name":"R TWER", "email": "R_TWER@PVRcyR)com"} { "name":"mwGwTOWKRXs GIGY", "email": "mwGwTOWKRXs_GIGY@FvERutwS]org"} { "name":"igUMTrViMt oTkFPAySfn", "email": "igUMTrViMt_oTkFPAySfn@kQekedu"} { "name":"MtvMHGBi R", "email": "MtvMHGBi_R@UCPbGDjJai&com"} { "name":"fbMyddFkTRP QeH", "email": "fbMyddFkTRP_QeH@ekmjacom"} { "name":"vO devQkFbORdi", "email": "vO_devQkFbORdi@LaAPfnmMcnTZlYorg"} { "name":"khT BoWvCONzyeOYoNgasncZnU", "email": "khT_BoWvCONzyeOYoNgasncZnU@kV-com"} { "name":"TmEU TvjeB", "email": "TmEU_TvjeB@pMMnvdcom"} { "name":"rzjoN jkpSd", "email": "rzjoN_jkpSd@qTLvRUedu"} { "name":"pgzQ fz", "email": "pgzQ_fz@Shtedu"} ```
About
Generate a stream of (roughly) uniform samples from the set of strings matching a regex
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published