Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coc1961/goregexp
https://github.com/coc1961/goregexp
go golang regex
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/coc1961/goregexp
- Owner: coc1961
- Created: 2019-08-14T23:40:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-16T22:26:57.000Z (over 5 years ago)
- Last Synced: 2024-03-22T04:43:23.454Z (9 months ago)
- Topics: go, golang, regex
- Language: Go
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# goregexp
>Calculate the regular expression based on a list of fixed width numbers
example
```sh
$> cat test/data.txt509000
509001
509002
509004
509005
509006
509007
..more 934 numbers..$> cat test/data.txt | goregexp
^(50670[7-8]|50671[5,8-9]|50672[0-1,4-9]|50673[0-3,9]|50674[1-3,5-7]|
506753|50677[4-8]|50900[0-2,4-7,9]|50901[0-2,4]|50902[0-9]|50903[0,5-9]
|50904[0-2,4-9]|50905[0-9]|50906[0-4,6-9]|50907[0-2,4-9]|50908[0-9]|
50909[1-2,5-9]|50910[0-1,6-9]|5091[1-9][0-9]|509[2-7][0-9][0-9]|50980
[0-7]|50983[1-9]|5098[4-6][0-9]|50987[0-7]|50989[7-9]|509900|50991[8-9]
|5099[2-5][0-9]|50996[0-4]|50997[1-9]|50998[0-6]|50999[5-9])$
```>see **data.txt** in the test folder