https://github.com/luciaheredia/pythonregex
Python Regex Exercises
https://github.com/luciaheredia/pythonregex
kaggle python3 regex-match regex-pattern
Last synced: about 2 months ago
JSON representation
Python Regex Exercises
- Host: GitHub
- URL: https://github.com/luciaheredia/pythonregex
- Owner: LuciaHeredia
- Created: 2024-11-28T17:53:52.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-03-30T18:55:56.000Z (2 months ago)
- Last Synced: 2025-03-30T19:34:42.540Z (2 months ago)
- Topics: kaggle, python3, regex-match, regex-pattern
- Language: Python
- Homepage:
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**Regular expressions (Regex)** are an extremely versatile tool for matching, searching, and manipulating text in Python.
(using **module re**)[PythonRegex.py](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py) :
1. [Validating Email Addresses](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L3)
2. [Extracting Phone Numbers](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L28)
3. [Parsing CSV Data](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L46)
4. [Extracting URLs](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L61)
5. [Finding Duplicate Words](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L80)
6. [Extracting Hashtags](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L101)
7. [Extracting IP Addresses](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegex.py#L118)[PythonRegexKaggle.py](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py) :
([Kaggle Source](https://www.kaggle.com/code/albeffe/regex-exercises-solutions/notebook))
1. [Is string alphanumeric](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L4)
2. Match string: [has an 'a' followed by none or more 'b's](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L24)
3. Match string: [has an 'a' followed by one or more b's](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L33)
4. Match string: [has an 'a' followed by zero or one 'b's](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L40)
5. Match string: [has an 'a' followed by three 'b's](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L47)
6. Match string: [has an 'a' followed by two or three 'b's](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L54)
7. Find sequences of: [lowercase letters joined with a underscore](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L82)
8. Find sequences of: [one upper case letter followed by lower case letters](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L91)
9. Match string: [has an 'a' followed by anything, ending in 'b'](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L61)
10. Match a word at: [the beginning of a string](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L105)
11. Match a word at: [the end of string, with optional punctuation](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L126)
12. Match a word containing: ['z'](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L147)
13. Match a word containing: ['z', not at start or end of the word](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L157)
14. Match string: [has only: upper/lowercase letters, numbers, underscores](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L177)
15. Match string: [where it starts with a specific number](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L187)
16. [Remove leading zeros from IP address](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L208)
17. [Check for a number at the end of a string](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L223)
18. Search in a string: [numbers(0-9) of length between 1-3](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L241)
19. Search: [literal strings in a string](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L260)
20. Search: [literal strings in a string & its location](https://github.com/LuciaHeredia/PythonRegex/blob/master/PythonRegexKaggle.py#L260)