https://github.com/pipe01/revregexp
Small library for randomly generating strings from a regex pattern.
https://github.com/pipe01/revregexp
go golang regex regexp
Last synced: 5 months ago
JSON representation
Small library for randomly generating strings from a regex pattern.
- Host: GitHub
- URL: https://github.com/pipe01/revregexp
- Owner: pipe01
- License: mit
- Created: 2020-10-11T13:16:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-11T21:49:29.000Z (over 5 years ago)
- Last Synced: 2025-10-26T10:44:50.335Z (8 months ago)
- Topics: go, golang, regex, regexp
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# revregexp
[](https://godoc.org/github.com/pipe01/revregexp)
[](https://goreportcard.com/report/github.com/pipe01/revregexp)
Small library for randomly generating strings from a regex pattern.
## Examples
| Regex pattern | Sample output |
|---------------------------|---------------|
| `.*` | hM7R |
| `\d+` | 415 |
| `[a-d4-8]{5}` | a8c6c |
| `[a-f0-9]{4}-[a-f0-9]{6}` | 893a-9034d1 |
## Sample usage
```go
import "github.com/pipe01/revregexp
str := revregexp.Reverse("Hello (World|Everyone)")
fmt.Println(str)
// Outputs "Hello World" or "Hello Everyone"
```