# Regex Tester

URL: https://phishdestroy.io/developer-tools/regex-tester
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Test a JavaScript regular expression against sample text and see every match with its position and capture groups. Useful for checking a pattern that pulls IPs, domains or email addresses out of headers and logs before you use it elsewhere.

## Example input

Received header line

```
Received: from mail.example.net (mail.example.net [203.0.113.25]) by mx.example.com; Tue, 14 Nov 2023 22:13:20 +0000
```

The default pattern (\d+) lists all 10 digit runs with their index and group 1; replace it with \b(?:\d{1,3}\.){3}\d{1,3}\b to match only 203.0.113.25.

## FAQ

### Which regex flavour does it use?

Your browser's JavaScript RegExp engine (ECMAScript syntax), including lookahead, lookbehind and named groups. The i, m and s flags can be ticked, and every match is listed with its index and numbered groups.

### What are the limits?

Matching is always global, so the g box makes no difference, and the u, y, d and v flags are not offered, so \p{…} escapes do not work. PCRE-only syntax such as possessive quantifiers (a++) is rejected, and a pattern with catastrophic backtracking can freeze the tab because there is no time limit.

### Is my text or pattern sent anywhere?

No. Matching runs in your browser and nothing is uploaded.

## Related tools

- [Find & Replace](https://phishdestroy.io/developer-tools/find-and-replace)
- [URL Defanger & IOC Extractor](https://phishdestroy.io/developer-tools/url-defanger)
- [IOC Converter](https://phishdestroy.io/developer-tools/ioc-converter)
- [JSON & JavaScript String Escaper](https://phishdestroy.io/developer-tools/string-escaper)
- [Invisible Character Detector](https://phishdestroy.io/developer-tools/invisible-char-detector)

All tools: https://phishdestroy.io/developer-tools
