https://github.com/wisehackermonkey/generator_20200324_simplified_regex
Simplified regex string generator
https://github.com/wisehackermonkey/generator_20200324_simplified_regex
regex simplified-regex-string-generator
Last synced: over 1 year ago
JSON representation
Simplified regex string generator
- Host: GitHub
- URL: https://github.com/wisehackermonkey/generator_20200324_simplified_regex
- Owner: wisehackermonkey
- License: mit
- Created: 2020-03-24T15:07:07.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2021-10-25T17:19:37.000Z (over 4 years ago)
- Last Synced: 2025-01-07T15:44:13.433Z (over 1 year ago)
- Topics: regex, simplified-regex-string-generator
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Generator_20200324_simplified_regex
#### Simplified regex string generator
```
by oran collins
20200324
```
----------
# UPDATE 2021
# This repo is is archived
# Found a javascript version of this library that is complete, and theres a ruby version too!
### Javascript [fent/randexp.js: Create random strings that match a given regular expression.](https://github.com/fent/randexp.js)
### Ruby [tom-lord/regexp-examples: Generate strings that match a given regular expression](https://github.com/tom-lord/regexp-examples)
#### Example Generate random ip addresses
> \>python .\generator_cli.py "[1-255].[1-255].[1-255].[1-255]"
=> 38.161.154.251
----
### How to install
>\>git clone https://github.com/wisehackermonkey/Generator_20200324_simplified_regex.git
> \>cd Generator_20200324_simplified_regex
### How to run Cli
> \>python .\generator_cli.py
#### Example Generate random ip address
> \>python .\generator_cli.py "[1-255].[1-255].[1-255].[1-255]"
##### returns
> Result: [1-255].[1-255].[1-255].[1-255] => 38.161.154.251
--------
### example strings can be generated using simplified regex*
```
combine multiple : [acb][123][X-Z] => a2X
escaped , () and [] : [\,\(\[][123][X-Z] => \3Z
IP address : [1-255].[1-255].[1-255].[1-255] => 252.249.168.79
```
##### *not really actually regex its just a few functions i created to mimic regex functionality
### TODO
#### fix phone number & imbeding
#### "([1-9][1-9][1-9])-([1-9][1-9][1-9])" does not work
- convert into python package
```