GitOpen Tools

GitOpen Tools

Developer Utilities

Text Tools

  • Case Converter
  • Text Escape
  • Lorem Ipsum
  • Text Formatter

Formatters

  • JSON Formatter
  • XML Formatter
  • SQL Formatter
  • CSS Formatter

Generators

  • Password Generator
  • UUID Generator
  • Color Generator

Testers

  • Regex Tester
  • URL Validator

Regex Tester

Test and debug regular expressions with real-time matching and highlighting

Regex Tester Tool

Test and debug regular expressions in real-time. Enter a regex pattern and test text to see matches highlighted instantly. Supports JavaScript regex syntax with flags. Use the quick reference and common patterns for help.

Regular Expression

Flags

Test Text

Matches Preview

0 matches
Matches will appear here...

Quick Reference

Character Classes

\dDigit (0-9)
\wWord character (a-z, A-Z, 0-9, _)
\sWhitespace
.Any character
[abc]Any of a, b, or c
[^abc]Not a, b, or c

Quantifiers

*0 or more
+1 or more
?0 or 1
{n}Exactly n times
{n,}n or more times
{n,m}Between n and m times

Anchors & Groups

^Start of string
$End of string
\bWord boundary
()Capture group
(?:)Non-capture group
|OR operator

Common Regex Patterns

password

Basic (8+ chars)

At least 8 characters

^.{8,}$

Medium (upper, lower, number)

1 uppercase, 1 lowercase, 1 number

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$

Strong (with special char)

Upper, lower, number, special char

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&]).{8,}$

Very Strong (no spaces)

No spaces, 8-32 chars

^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[^\s]{8,32}$

email

Standard Email

Works for 95% of real-world use

^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$

phone

International (E.164)

International phone format

^\+?[1-9]\d{1,14}$

Vietnam Phone

Vietnam phone numbers

^(0|\+84)(3|5|7|8|9)\d{8}$

url

HTTP/HTTPS URL

HTTP/HTTPS URLs

^(https?:\/\/)([\w\-]+\.)+[\w\-]+(\/[\w\-._~:/?#\[\]@!$&'()*+,;=]*)?$

Domain Only

Domain name validation

^([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}$

username

Basic (3-20 chars)

Letters, numbers, underscore

^[a-zA-Z0-9_]{3,20}$

No Starting Number

Letters first, then alphanumeric

^[a-zA-Z][a-zA-Z0-9_]{2,19}$

numbers

Integer Only

Positive/negative integers

^-?\d+$

Decimal Number

Decimal numbers

^-?\d+(\.\d+)?$

Positive Number

Positive numbers only

^\d+(\.\d+)?$

ids

UUID v4

UUID version 4

^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$

Alphanumeric Code

6-12 character code

^[A-Za-z0-9]{6,12}$

dateTime

Date (YYYY-MM-DD)

ISO date format

^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$

Time (HH:mm)

24-hour time

^([01]\d|2[0-3]):[0-5]\d$

security

No Special Chars

Only letters, numbers, spaces

^[a-zA-Z0-9\s]+$

No Whitespace

No spaces allowed

^\S+$

Trim Spaces

Leading/trailing spaces

^\s+|\s+$