🧰Locly

Online Regex Tester (No Upload)

Test regular expressions with live highlighting, processed locally in your browser

About This Tool

Regular expressions (regex) are powerful patterns used for matching, searching, and manipulating text. This tool lets you test regex patterns against sample text with live highlighting of matches. All processing happens locally in your browser - your test data is never uploaded to any server, making it safe for testing patterns against sensitive content.

How to Use

  1. Enter your regular expression pattern in the 'Pattern' field
  2. Select regex flags as needed (g for global, i for case-insensitive, etc.)
  3. Enter or paste your test text in the 'Test Text' area
  4. Matches are highlighted in real-time as you type
  5. View the match count and details below the test text

Common Use Cases

  • Pattern development: Build and refine regex patterns interactively
  • Data validation: Test email, phone, URL validation patterns
  • Text extraction: Develop patterns to extract specific data from text
  • Code development: Test patterns before implementing in your code
  • Learning: Understand how different regex constructs work

FAQ

Q1: What regex flavor does this tool use?

This tool uses JavaScript's built-in RegExp engine, which follows ECMAScript standards. Most common regex features are supported including lookahead, but lookbehind support depends on your browser version.

Q2: Why aren't my matches highlighting?

Check that: 1) Your pattern is valid (no syntax errors); 2) The 'g' flag is enabled for multiple matches; 3) Your pattern actually matches content in the test text. Try a simple pattern like 'test' first to verify the tool is working.

Q3: How do I match special characters?

Escape special regex characters with a backslash: \. for period, \* for asterisk, \[ for bracket, etc. To match a literal backslash, use \\.

Q4: What do the different flags mean?

g (global): Find all matches, not just first. i (case-insensitive): Ignore case. m (multiline): ^ and $ match line starts/ends. s (dotall): . matches newlines. u (unicode): Enable full Unicode support.

Q5: Is my test data private?

Yes, completely. All regex processing happens in your browser using JavaScript. No data is sent to any server. You can safely test patterns against sensitive or confidential text.

Related Tools