Aller au contenu
Tous les outils

Regex Lab

Disponible

Créez, testez, déboguez et réutilisez des expressions régulières avec correspondances en direct, tests unitaires, bibliothèque organisée, analyse de compatibilité et exécution locale sécurisée.

Exécution locale. Vos données de test ne quittent jamais ce navigateur.
//gm
JavaScript / ECMAScript·exécution native du navigateur
Aperçu des correspondances
INFO server ready
WARN retrying request
ERROR upstream timeout
DEBUG hidden diagnostics

Bibliothèque Regex

Recherchez des recettes organisées avec descriptions, exemples et tests prêts à l’emploi, puis chargez la recette complète dans l’espace de travail.

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

Référence rapide

Recherchez les ancres, classes de caractères, groupes, lookarounds, quantificateurs et opérateurs courants.

Tous les tokens

80 affichés · 80 tokens au total

\n

Newline character

Motif
\r

Carriage return character

Motif
\t

Tab character

Motif
\0

Null character

Motif
\f

Form feed character

Motif
\v

Vertical tab character

Motif
.

Any character except line terminators unless dotAll is enabled

Motif
a|b

Alternation — match either expression

Motif
\d

Any digit character

Motif
\D

Any non-digit character

Motif
\w

Any word character

Motif
\W

Any non-word character

Motif
\s

Any whitespace character

Motif
\S

Any non-whitespace character

Motif
[abc]

One character from the set

Motif
[^abc]

One character not present in the set

Motif
[a-z]

One character inside a range

Motif
[a-zA-Z]

One character from multiple ranges

Motif
[[:alnum:]]

POSIX letters and digits class

Motifpcre2
[[:alpha:]]

POSIX letters class

Motifpcre2
[[:digit:]]

POSIX decimal digits class

Motifpcre2
[[:space:]]

POSIX whitespace class

Motifpcre2
[[:word:]]

POSIX word-character class

Motifpcre2
^

Start of input, or start of line in multiline mode

Motif
$

End of input, or end of line in multiline mode

Motif
\A

Absolute start of string

Motifpcre2
\Z

End of string, or before its final line terminator

Motifpcre2
\z

Absolute end of string

Motifpcre2
\b

Word boundary

Motif
\B

Non-word boundary

Motif
\G

Start of the current match attempt

Motifpcre2
a?

Zero or one occurrence

Motif
a*

Zero or more occurrences

Motif
a+

One or more occurrences

Motif
a{3}

Exactly three occurrences

Motif
a{3,}

Three or more occurrences

Motif
a{3,6}

Between three and six occurrences

Motif
a*?

Lazy quantifier — consume as little as possible

Motif
a*+

Possessive quantifier — do not backtrack

Motifpcre2
(...)

Capturing group

Motif
(?:...)

Non-capturing group

Motif
(?<name>...)

Named capturing group

Motifjavascript
(?P<name>...)

Python-style named capturing group

Motifpython
(?>...)

Atomic non-capturing group

Motifpcre2
(?#...)

Inline comment group

Motifpcre2
(?=...)

Positive lookahead assertion

Motif
(?!...)

Negative lookahead assertion

Motif
(?<=...)

Positive lookbehind assertion

Motif
(?<!...)

Negative lookbehind assertion

Motif
\1

Match text previously captured by group 1

Motif
\k<name>

Match text captured by a named group

Motifjavascript
\k{name}

PCRE2 named backreference

Motifpcre2
\g{-1}

PCRE2 relative numeric backreference

Motifpcre2
g

Global matching

Optionjavascript
m

Multiline anchors

Option
i

Case-insensitive matching

Option
s

Dot matches line terminators

Option
u

Unicode-aware matching

Optionjavascript
y

Sticky matching from the current lastIndex

Optionjavascript
x

Ignore pattern whitespace and allow comments

Optionpcre2
U

Invert default greediness

Optionpcre2
$&

Insert the complete match

Remplacementjavascript
$1

Insert capture group 1

Remplacement
$<name>

Insert a named capture group

Remplacementjavascript
$$

Insert a literal dollar sign

Remplacementjavascript
$`

Insert content before the match

Remplacementjavascript
$'

Insert content after the match

Remplacementjavascript
${1}

PCRE2 replacement capture group

Remplacementpcre2
\p{Letter}

Match a Unicode property or script category

Motif
\P{Letter}

Negated Unicode property or script category

Motif
\X

Extended Unicode grapheme sequence

Motifpcre2
\R

Unicode newline sequence

Motifpcre2
\x20

Character by hexadecimal value

Motif
\u{1F600}

Unicode code point escape

Motifjavascript
\Q...\E

Treat enclosed text as literals

Motifpcre2
\K

Reset the reported start of the current match

Motifpcre2
(*ACCEPT)

PCRE2 control verb — immediately accept the current match

Motifpcre2
(*FAIL)

PCRE2 control verb — force the current match path to fail

Motifpcre2
(*SKIP)

PCRE2 control verb — move the next match attempt forward

Motifpcre2
(*UTF)

Enable UTF mode in PCRE2

Motifpcre2

Exécution isolée

Les expressions JavaScript s’exécutent dans un Web Worker dédié avec une limite stricte afin qu’un motif pathologique ne bloque pas l’interface Devary.

Conçu pour la portabilité

Choisissez une saveur cible pour examiner les problèmes de portabilité et générer du code sans prétendre qu’un moteur se comporte comme tous les runtimes.

Espace privé

Les motifs, exemples, tests et handoffs importés restent dans la mémoire du navigateur et ne sont pas envoyés à un backend Devary.