https://github.com/faraazarsath/user-registration-login
This Python script provides a simple user registration system with username and password validation using regular expressions. It also includes a password recovery option.
https://github.com/faraazarsath/user-registration-login
filehandling if-else python regular-expression
Last synced: about 2 months ago
JSON representation
This Python script provides a simple user registration system with username and password validation using regular expressions. It also includes a password recovery option.
- Host: GitHub
- URL: https://github.com/faraazarsath/user-registration-login
- Owner: FaraazArsath
- Created: 2022-07-29T18:34:45.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-15T05:48:27.000Z (over 1 year ago)
- Last Synced: 2025-03-05T22:48:48.890Z (over 1 year ago)
- Topics: filehandling, if-else, python, regular-expression
- Language: Jupyter Notebook
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# User Authentication System in Python
A simple Python program for user registration, login, and password recovery, utilizing regular expressions for input validation.
## 🚀 Features
User Registration: Allows users to create a username and password, ensuring they meet predefined validation criteria.
User Login: Enables existing users to log in securely using stored credentials.
Password Recovery: Provides users with an option to recover their password by verifying their username.
## 🔧 Functions
register() → Creates a new user account. Validates the username using a regular expression to ensure an email-like format.
passwd() → Prompts users to set a password, enforcing strong password rules (uppercase, lowercase, digit, and special character).
forgetpassword() → Initiates the password recovery process by verifying the provided username.
## 🛠Regular Expressions
Username Validation:
r'^[a-zA-Z]+[._]?[a-zA-Z0-9]+[@]\w+[.]\w{2,3}$'
Password Validation:
r"^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#])"
## 📂 Note
User data is securely stored in a file named database.txt.