All tools are free, but if they have helped you, buy me a coffee ☕!

🚀 ToolsyKit

Your Hub for Free AI-Generated Tools

🧩 Regex Tester & Generator

Quick Tips for Using Regex
  • . - Matches any single character except newline.
  • ^ - Matches the beginning of a string.
  • $ - Matches the end of a string.
  • \d - Matches any digit (0-9).
  • \w - Matches any word character (alphanumeric + underscore).
  • \s - Matches any whitespace character.
  • * - Matches 0 or more of the preceding character.
  • + - Matches 1 or more of the preceding character.
  • ? - Matches 0 or 1 of the preceding character (optional).
  • [abc] - Matches any one of the characters a, b, or c.
  • (abc) - Groups characters as a single unit.

Common Flags Explained:

  • g - Global search (find all matches, not just the first).
  • i - Case-insensitive search.
  • m - Multiline mode (anchors ^ and $ match line starts/ends).
  • s - Allows dot (.) to match newline characters.
  • u - Enables full Unicode matching.
  • y - Sticky mode (matches only from the last index position).

Example Patterns

  • Email Validation:
    Pattern: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
    Example Match: user@example.com
  • Phone Number (US Format):
    Pattern: \(\d{3}\) \d{3}-\d{4}
    Example Match: (123) 456-7890
  • Date (YYYY-MM-DD):
    Pattern: \d{4}-\d{2}-\d{2}
    Example Match: 2024-02-22
  • URL Detection:
    Pattern: https?:\/\/[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?
    Example Match: https://example.com
  • Find Words Starting with Capital Letters:
    Pattern: \b[A-Z][a-z]*\b
    Example Match: Regex in "This is a Regex Example"

Generator Examples

  • Email Example:
    Input: user@example.com
    Generated Regex: ^[\w.%+-]+@[\w.-]+\.[a-zA-Z]{2,}$
  • Phone Number Example:
    Input: (123) 456-7890
    Generated Regex: \(\d{3}\) \d{3}-\d{4}
  • Date Example:
    Input: 2024-02-22
    Generated Regex: \d{4}-\d{2}-\d{2}
  • URL Example:
    Input: https://example.com
    Generated Regex: https?:\/\/[\w.-]+\.[a-zA-Z]{2,}(?:\/[^\s]*)?
  • Exact Match Example:
    Input: Hello (world)!
    Generated Regex: Hello \(world\)!
🔧 All Tools 📝 Any Issues?