Thank you for interest in contributing to Regex Pro! We welcome bug reports, feature suggestions, code improvements, and documentation enhancements.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Coding Standards
- Git Workflow
- Pull Request Process
- Reporting Bugs
- Suggesting Enhancements
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
We are committed to providing a welcoming and inspiring community for all. Please read and follow our Code of Conduct.
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Text editor or IDE (VS Code, Sublime, etc.)
- Git for version control
- Basic knowledge of HTML5, CSS3, and JavaScript
# 1. Clone the repository
git clone https://github.com/ItsWanheda/regex-pro.git
cd regex-pro
# 2. Open in browser
open index.html
# or
python3 -m http.server 8000
# then visit http://localhost:8000
# 3. Make changes
# - Edit index.html, style.css, or script.js
# - Browser auto-reloads (or refresh manually)
# - Test your changes thoroughlyFound a bug? Help us fix it!
Before submitting:
- Check if bug already exists in Issues
- Test with latest version
- Gather information:
- Browser and OS
- Regex pattern that triggers bug
- Expected vs actual behavior
- Console errors (F12 → Console)
Submit bug report:
## Bug: [Short Description]
### Steps to Reproduce
1. Open Regex Pro
2. Enter pattern: `[pattern]`
3. Input text: `[text]`
4. Observe error...
### Expected Behavior
Should display matches
### Actual Behavior
Shows error message
### Environment
- Browser: Chrome 115
- OS: macOS 13
- Regex Pattern: `\d+`Have an idea for improvement? We'd love to hear it!
Before submitting:
- Check if feature already requested
- Explain use case and benefits
- Provide examples
Submit feature request:
## Feature: [Title]
### Problem
Users struggle with X because Y
### Proposed Solution
Add feature that allows users to Z
### Example Use Case
When I use regex for [purpose], I need [feature]
### Additional Context
Related to similar tools in X, Y, ZImprove existing code, fix issues, add optimizations.
Good candidates for contribution:
- Performance optimizations
- Bug fixes
- Code refactoring
- Accessibility improvements
- Documentation updates
- Test coverage
index.html
- Semantic HTML5 structure
- ARIA labels and accessibility
- Form elements and containers
- Do NOT add classes or IDs without purpose
style.css
- Visual design and layout
- CSS variables for theming
- Responsive design rules
- Animations and transitions
- Keep organized by sections (marked with comments)
script.js
- Application logic
- Event handling
- DOM manipulation
- Storage management
- Follows modular IIFE pattern
// ✅ Good - Use const/let, meaningful names
const matchCount = matches.length;
let isValid = pattern.length > 0;
// ❌ Avoid - var, unclear names
var c = matches.length;
var v = pattern.length > 0;
// ✅ Good - Clear comments for complex logic
function validateRegex(pattern, flags) {
try {
new RegExp(pattern, flags);
return true;
} catch (e) {
return false; // Invalid regex syntax
}
}
// ✅ Good - Arrow functions for callbacks
dom.regexInput.addEventListener('input', () => update());
// ✅ Good - Template literals
const message = `Found ${count} matches`;- Keep functions focused and single-purpose
- Max ~50 lines per function (refactor if longer)
- Use clear, descriptive names
- Document complex logic with comments
- Use IIFE pattern to avoid global scope
// ✅ Good - Handle errors gracefully
try {
const text = await file.text();
// process file
} catch (e) {
Toast.error('Failed to read file');
}
// ✅ Good - localStorage errors
try {
localStorage.setItem(key, value);
} catch (e) {
console.warn('Storage unavailable'); // silent fail
}/* ✅ Good - BEM-like naming */
.button { }
.button--primary { }
.button:hover { }
/* ✅ Good - Descriptive classes */
.toast-container { }
.modal-overlay { }
.sidebar-tabs { }
/* ❌ Avoid - Vague names */
.red { }
.big-text { }
.container2 { }/* ✅ Use variables for consistency */
:root {
--primary-color: #667eea;
--spacing-unit: 8px;
--shadow-md: 0 8px 32px rgba(0,0,0,0.3);
}
.button {
background: var(--primary-color);
padding: var(--spacing-unit);
box-shadow: var(--shadow-md);
}/* ✅ Mobile-first approach */
.sidebar {
width: 100%;
}
@media (min-width: 768px) {
.sidebar {
width: 320px;
}
}<!-- ✅ Good - Semantic, accessible -->
<button class="btn" data-action="copy" aria-label="Copy regex">
Copy
</button>
<!-- ✅ Good - Proper form structure -->
<input type="text" id="regexInput" placeholder="..." aria-label="..." />
<!-- ❌ Avoid - Non-semantic, unclear -->
<div onclick="copy()" title="Click to copy">Click me</div># Fork repo on GitHub, then:
git clone https://github.com/ItsWanheda/regex-pro.git
cd regex-pro
git remote add upstream https://github.com/ORIGINAL_OWNER/regex-pro.git# Use descriptive branch names
git checkout -b fix/css-path-issue
git checkout -b feature/dark-mode
git checkout -b docs/update-readmefix/- Bug fixesfeature/- New featuresrefactor/- Code improvementsdocs/- Documentationperf/- Performance improvements
# Edit files
# Test changes thoroughly
# Commit with clear messages
git add .
git commit -m "fix: correct CSS import path"
git commit -m "feat: add theme customization"
git commit -m "docs: update README with examples"<type>: <subject>
<body>
<footer>
Types: fix, feat, docs, refactor, perf, test
Subject: Present tense, max 50 chars, lowercase
Body: Explain what and why (not how)
fix: correct CSS import path
The index.html file referenced './Style/style.css' but the actual file
was at './style.css'. This prevented styles from loading correctly.
Fixes #123
feat: add regex explanation generator
Implement automatic pattern explanation feature that breaks down
complex regex into human-readable format. Includes support for
capture groups and alternation patterns.
Closes #456
# Before submitting PR
git fetch upstream
git rebase upstream/main
git push origin fix/css-path-issue- Code follows style guidelines
- Comments added for complex logic
- Documentation updated (README, CHANGELOG)
- Tested in multiple browsers (Chrome, Firefox, Safari)
- No console errors or warnings
- Accessibility not degraded (test with keyboard)
- Performance not impacted
- Commit history is clean
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Related Issues
Fixes #123
## Testing
Tested on:
- [ ] Chrome (latest)
- [ ] Firefox (latest)
- [ ] Safari
- [ ] Mobile (describe)
## Checklist
- [ ] Code follows style guidelines
- [ ] Changes tested thoroughly
- [ ] Documentation updated
- [ ] No breaking changes (or documented)- Maintainer reviews code
- Requested changes discussed
- Updates made if needed
- Final approval
- Branch merged to main
- Branch is deleted
- Changes appear in next release
- You're awesome! Thank you! 🎉
- Searched existing issues
- Tested with latest version
- Clear, descriptive title
- Steps to reproduce (numbered)
- Expected vs actual behavior
- Screenshots/videos (if helpful)
- Browser and OS info
- Console errors (if any)
## Bug: Regex flag toggles not updating pattern
### Steps to Reproduce
1. Open Regex Pro
2. Click the 'i' (case-insensitive) flag toggle
3. Observe pattern input field
### Expected Behavior
The 'i' flag should appear in flags input field
### Actual Behavior
Toggles work but pattern doesn't update
### Browser & OS
Chrome 115.0 on macOS 13.5
### Console Error
No errors shown- Searched existing suggestions
- Clear use case and benefits
- Specific examples
- No duplicates
- Relates to project scope
## Enhancement: Add regex complexity rating
### Problem
Users want to know if their regex is overly complex
### Proposed Solution
Add visual indicator (color bar) showing regex complexity (simple to advanced)
### Example Use Case
When I create complex regex patterns, I want to see if there's a simpler way
### Additional Context
- Complexity could be based on: groups, lookaround, backtracking
- Similar to RegExr complexity visualization- 💬 Open a Discussion
- 📧 Email maintainers
- 🐦 Twitter mention
- 📖 Check existing docs
Contributors will be recognized in:
- README.md contributors section
- CHANGELOG.md release notes
- GitHub contributors page
Thank you for helping make Regex Pro better! 🙌
Last Updated: 2026-08-03
Maintained By: ItsWanheda