GitOpen Tools

GitOpen Tools

Developer Utilities

Text Tools

  • Case Converter
  • Text Escape

Formatters

  • JSON Formatter
  • SQL Formatter

Generators

  • Password Generator
  • UUID 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+$

What is Regex Tester?

Regex Tester is a browser-based playground for JavaScript regular expressions. It helps you verify a pattern against real text, preview matches immediately, and adjust flags and syntax without repeatedly running code.

How to use Regex Tester

  1. Enter your regex pattern in the Regular Expression box.
  2. Toggle the flags you need (g, i, m, s, u) to match your runtime behavior.
  3. Paste sample text and watch matches highlight in the preview automatically.
  4. Copy the regex or matched results when you are satisfied.

When to use Regex Tester

  • When building validation rules for emails, usernames, IDs, and log parsing.
  • When extracting groups from strings (URLs, headers, timestamps, or filenames).
  • When a pattern behaves differently due to flags like global or multiline.
  • When you want quick examples and a cheat sheet while writing regex.

Why use GitOpenTools?

GitOpenTools keeps debugging lightweight: open the page, test your regex, and move on. No install, no account, and no hidden paywalls. It is a privacy-first collection of tools built for day-to-day developer work.

FAQ

What is a regex tester?

It is a tool for trying a regular expression against text and seeing matches instantly, so you can iterate faster.

Which flags can I use in this regex tester?

You can toggle common JavaScript RegExp flags including g, i, m, s, and u.

Does this tool support JavaScript regex syntax?

Yes. It is built around JavaScript RegExp, which is useful for frontend code and Node.js.

Is the Regex Tester free on GitOpenTools?

Yes. It is free to use with no sign-up and no installation.