Ir para o conteúdo
Todas as ferramentas

Regex Lab

Disponível

Crie, teste, depure e reutilize expressões regulares com matches em tempo real, testes unitários, biblioteca curada, análise de compatibilidade e execução local segura.

Executa localmente. Seus dados de teste nunca saem deste navegador.
//gm
JavaScript / ECMAScript·execução nativa do navegador
Prévia dos matches destacados
INFO server ready
WARN retrying request
ERROR upstream timeout
DEBUG hidden diagnostics

Biblioteca Regex

Pesquise receitas curadas com descrições, exemplos e testes prontos e carregue a receita completa no workspace.

Practical email address

validation · javascript

Matches a pragmatic email shape for UI validation without pretending to implement the full RFC grammar.

/^[^\s@]+@[^\s@]+\.[^\s@]+$/i
emailformsvalidation

UUID v4

validation · javascript

Matches canonical UUID version 4 strings with the correct version and variant nibble.

/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i
uuididentifierapi

ISO date shape

dates · javascript

Matches YYYY-MM-DD text shape. Calendar validity such as leap years still belongs to date parsing.

/\b\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])\b/g
dateisoyyyy-mm-dd

HEX color

validation · javascript

Matches three, four, six or eight digit CSS hexadecimal color values.

/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i
csscolorhexfrontend

Semantic version core

extraction · javascript

Extracts major, minor and patch numbers with optional prerelease and build metadata.

/\b(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)(?:-(?<pre>[0-9A-Za-z.-]+))?(?:\+(?<build>[0-9A-Za-z.-]+))?\b/g
semverversionrelease

HTTP(S) URL

web · javascript

Finds HTTP and HTTPS URLs in prose. Use URL parsing for authoritative validation.

/https?:\/\/[^\s<>"]+/gi
urlhttphttpsweb

Key/value log fields

logs · javascript

Extracts simple key=value pairs and exposes key and value as named captures.

/(?<key>[A-Za-z_][\w.-]*)=(?<value>"[^"]*"|[^\s]+)/g
logskey-valueobservability

Log level

logs · javascript

Finds common application log levels as standalone words.

/\b(?:TRACE|DEBUG|INFO|WARN|ERROR|FATAL)\b/gi
logsleveldebugobservability

URL slug

validation · javascript

Matches lowercase URL slugs made of alphanumeric segments separated by single hyphens.

/^[a-z0-9]+(?:-[a-z0-9]+)*$/
slugurlrouting

IPv4 address

validation · javascript

Matches IPv4 octets from 0 to 255 without accepting over-range values.

/^(?:(?:25[0-5]|2[0-4]\d|1?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|1?\d?\d)$/
ipnetworkipv4

JWT compact shape

extraction · javascript

Finds strings shaped like a compact three-part JWT/JWS. It does not validate signatures or claims.

/\b[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\b/g
jwttokensecurity

Double quoted string

text · javascript

Extracts double-quoted strings while allowing escaped characters inside them.

/"(?:\\.|[^"\\])*"/g
stringquotesparser

Referência rápida

Pesquise âncoras, classes de caracteres, grupos, lookarounds, quantificadores e operadores comuns.

Todos os tokens

80 exibidos · 80 tokens no total

\n

Newline character

Padrão
\r

Carriage return character

Padrão
\t

Tab character

Padrão
\0

Null character

Padrão
\f

Form feed character

Padrão
\v

Vertical tab character

Padrão
.

Any character except line terminators unless dotAll is enabled

Padrão
a|b

Alternation — match either expression

Padrão
\d

Any digit character

Padrão
\D

Any non-digit character

Padrão
\w

Any word character

Padrão
\W

Any non-word character

Padrão
\s

Any whitespace character

Padrão
\S

Any non-whitespace character

Padrão
[abc]

One character from the set

Padrão
[^abc]

One character not present in the set

Padrão
[a-z]

One character inside a range

Padrão
[a-zA-Z]

One character from multiple ranges

Padrão
[[:alnum:]]

POSIX letters and digits class

Padrãopcre2
[[:alpha:]]

POSIX letters class

Padrãopcre2
[[:digit:]]

POSIX decimal digits class

Padrãopcre2
[[:space:]]

POSIX whitespace class

Padrãopcre2
[[:word:]]

POSIX word-character class

Padrãopcre2
^

Start of input, or start of line in multiline mode

Padrão
$

End of input, or end of line in multiline mode

Padrão
\A

Absolute start of string

Padrãopcre2
\Z

End of string, or before its final line terminator

Padrãopcre2
\z

Absolute end of string

Padrãopcre2
\b

Word boundary

Padrão
\B

Non-word boundary

Padrão
\G

Start of the current match attempt

Padrãopcre2
a?

Zero or one occurrence

Padrão
a*

Zero or more occurrences

Padrão
a+

One or more occurrences

Padrão
a{3}

Exactly three occurrences

Padrão
a{3,}

Three or more occurrences

Padrão
a{3,6}

Between three and six occurrences

Padrão
a*?

Lazy quantifier — consume as little as possible

Padrão
a*+

Possessive quantifier — do not backtrack

Padrãopcre2
(...)

Capturing group

Padrão
(?:...)

Non-capturing group

Padrão
(?<name>...)

Named capturing group

Padrãojavascript
(?P<name>...)

Python-style named capturing group

Padrãopython
(?>...)

Atomic non-capturing group

Padrãopcre2
(?#...)

Inline comment group

Padrãopcre2
(?=...)

Positive lookahead assertion

Padrão
(?!...)

Negative lookahead assertion

Padrão
(?<=...)

Positive lookbehind assertion

Padrão
(?<!...)

Negative lookbehind assertion

Padrão
\1

Match text previously captured by group 1

Padrão
\k<name>

Match text captured by a named group

Padrãojavascript
\k{name}

PCRE2 named backreference

Padrãopcre2
\g{-1}

PCRE2 relative numeric backreference

Padrãopcre2
g

Global matching

Flagjavascript
m

Multiline anchors

Flag
i

Case-insensitive matching

Flag
s

Dot matches line terminators

Flag
u

Unicode-aware matching

Flagjavascript
y

Sticky matching from the current lastIndex

Flagjavascript
x

Ignore pattern whitespace and allow comments

Flagpcre2
U

Invert default greediness

Flagpcre2
$&

Insert the complete match

Substituiçãojavascript
$1

Insert capture group 1

Substituição
$<name>

Insert a named capture group

Substituiçãojavascript
$$

Insert a literal dollar sign

Substituiçãojavascript
$`

Insert content before the match

Substituiçãojavascript
$'

Insert content after the match

Substituiçãojavascript
${1}

PCRE2 replacement capture group

Substituiçãopcre2
\p{Letter}

Match a Unicode property or script category

Padrão
\P{Letter}

Negated Unicode property or script category

Padrão
\X

Extended Unicode grapheme sequence

Padrãopcre2
\R

Unicode newline sequence

Padrãopcre2
\x20

Character by hexadecimal value

Padrão
\u{1F600}

Unicode code point escape

Padrãojavascript
\Q...\E

Treat enclosed text as literals

Padrãopcre2
\K

Reset the reported start of the current match

Padrãopcre2
(*ACCEPT)

PCRE2 control verb — immediately accept the current match

Padrãopcre2
(*FAIL)

PCRE2 control verb — force the current match path to fail

Padrãopcre2
(*SKIP)

PCRE2 control verb — move the next match attempt forward

Padrãopcre2
(*UTF)

Enable UTF mode in PCRE2

Padrãopcre2

Execução isolada

Expressões JavaScript rodam em um Web Worker dedicado com limite rígido de tempo para que um padrão problemático não congele a interface do Devary.

Projetado para portabilidade

Escolha um flavor alvo para revisar problemas de portabilidade e gerar código sem fingir que um único motor se comporta como todos os runtimes.

Workspace privado

Padrões, exemplos, testes e handoffs importados permanecem na memória do navegador e não são enviados a um backend do Devary.