|
| 1 | +## About |
| 2 | + |
| 3 | +This is a **work-in-progress** GUI app to help you practice Python regular expressions. |
| 4 | + |
| 5 | +The script has been tested for `python3.9` version on Linux. |
| 6 | + |
| 7 | +Currently, only a few questions for `re.search()` function have been added. `flags=re.M` is enabled to differentiate line and string anchors. |
| 8 | + |
| 9 | +See [Exercises.md](https://github.com/learnbyexample/py_regular_expressions/blob/master/exercises/Exercises.md) for exercise questions from the **Python re(gex)?** book. |
| 10 | + |
| 11 | +## Instructions |
| 12 | + |
| 13 | +Download [regex_practice.py](https://github.com/learnbyexample/py_regular_expressions/raw/master/interactive_exercises/regex_practice.py) and [questions.json](https://github.com/learnbyexample/py_regular_expressions/raw/master/interactive_exercises/questions.json) or clone this repo as shown below. |
| 14 | + |
| 15 | +```bash |
| 16 | +$ git clone --depth=1 https://github.com/learnbyexample/py_regular_expressions |
| 17 | + |
| 18 | +$ cd py_regular_expressions/interactive_exercises/ |
| 19 | + |
| 20 | +# use py instead of python3.9 for Windows |
| 21 | +$ python3.9 regex_practice.py |
| 22 | +``` |
| 23 | + |
| 24 | +Your progress will be saved in a new file named `user_progress.json`. If you close the app and launch it again, already solved questions will be automatically skipped. |
| 25 | + |
| 26 | +## TODO |
| 27 | + |
| 28 | +* Add many more questions |
| 29 | +* Use `ttk` |
| 30 | +* Refactor |
| 31 | +* Add tests? |
| 32 | +* Etc |
0 commit comments