https://github.com/dubniczky/regex-collection
Collection of regular expressions for matching strings
https://github.com/dubniczky/regex-collection
python regex regular-expression
Last synced: about 1 year ago
JSON representation
Collection of regular expressions for matching strings
- Host: GitHub
- URL: https://github.com/dubniczky/regex-collection
- Owner: dubniczky
- Created: 2022-11-12T01:29:32.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-11-12T10:35:34.000Z (over 3 years ago)
- Last Synced: 2025-02-06T19:49:15.641Z (over 1 year ago)
- Topics: python, regex, regular-expression
- Language: Python
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Regex Collection
Collection of regular expressions for matching strings
## Introduction
This repository is to store commonly used regular expressions for matching specific strings. They are made to be as strict as possible, so they might require some adjustments before use.
## Testing
Testing is done with Python built-in regular expression library `re`. The testing engine is `pytest`. The testing engine uses custom scripts that work in the following format:
```python
def test_NAME():
simulate(
[ 'MATCH_1', 'MATCH_2', '...' ],
[ 'NOMATCH_1', 'NOMATCH_2', '...' ],
)
```
## Contributing
1. Add your regular expression to the `expressions` folder
2. Add a test with a couple of matching, and non-matching cases
## Sources
- Custom expressions
- Contributions from internal projects
- https://projects.lukehaas.me/regexhub/