Aller au contenu
uencoder

Testeur de regex

Test regular expressions with match highlighting, capture groups, and replace preview. Gratuit, privé et 100% côté client.

Essayer un exemple:
Local only

Historique récent

Aucun historique

Utilisation

  1. Enter the regular expression pattern.
  2. Paste the test text into the input box.
  3. Toggle flags and read matches with capture groups.

Tâches utilisant cet outil

Analyser SQL requête exécution plans
EXPLAIN affiche comment le base de données executes un requête. Apprendre en lire plans, identifier goulots d’étranglement, et optimiser.
TÂCHE
Calculer edit distance (Levenshtein)
Éditer distance measures le minimum nombre de insertions, deletions, et substitutions en transformer one chaîne en another. Utilisé en spell checking et fuzzy matching.
TÂCHE
Calculer Levenshtein distance
Levenshtein distance measures le minimum edits (insert, supprimer, substitute) en transformer one chaîne en another. Utilisé en spell checking et fuzzy matching.
TÂCHE
Calculer TF-IDF for text importance
TF-IDF (Terme Frequency-Inverse Document Frequency) measures mot importance en un document relative en un corpus. Utilisé en search et texte mining.
TÂCHE
Déboguer regex motifs étape par étape
Déboguer regex par testing against sample inputs, visualizing le correspondre, et understanding pourquoi un motif matches ou fails. Utiliser flags correctly.
TÂCHE
Extraire all URLs from a block of text
Trouver chaque URL (http, https, ftp) en unstructured texte et list them pour validation, deduplication, ou batch processing.
TÂCHE
Extraire hashtags from text
Hashtags démarrer avec # followed par letters, nombres, et underscores. Apprendre en extraire, valider, et normaliser hashtags de social media texte.
TÂCHE
Extraire @mentions from text
Mentions démarrer avec @ followed par un username. Apprendre en extraire mentions, valider usernames, et link them en utilisateur profiles.
TÂCHE
Trouver et remplacer texte utilisant un regular expression
Search pour motifs (non juste literal chaînes) en texte et remplacer matches avec un template ce peut référence capture groups.
TÂCHE
Formater and beautify SQL statements
SQL formatting improves readability et maintainability. Apprendre indentation règles, keyword alignment, et consistent style pour complexe queries.
TÂCHE
Design base de données indexes pour performance
Indexes speed up reads mais lent down writes. Apprendre B-tree, hachage, composite, et partial indexes, et quand en utiliser chaque.
TÂCHE
Optimiser regex pour performance
Lent regex peut cause ReDoS (Regular Expression Denial de Service). Apprendre en identifier et fix catastrophic backtracking, utiliser atomic groups, et anchor motifs.
TÂCHE
Optimiser lent SQL queries
Identifier et fix lent SQL queries utilisant EXPLAIN analyse, index optimization, et requête rewriting techniques.
TÂCHE
Supprimer stop words from text
Arrêter mots sont commun mots (le, est, at, qui) ce ajouter little meaning. Removing them improves search et NLP efficiency.
TÂCHE
Tester un regular expression avant shipping it
Valider pattern syntax, inspect every match with capture groups, and learn the backtracking pitfalls that turn a regex into an outage.
TÂCHE
Tokenize texte pour NLP processing
Tokenization splits texte en tokens (mots, sentences, subwords). Apprendre mot, sentence, et subword tokenization pour NLP tâches.
TÂCHE
Implement plein-texte search en SQL
Plein-texte search indexes mots en texte pour rapide searching. Apprendre en utiliser FULLTEXT indexes, tsvector, et ranking.
TÂCHE
Utiliser regex backreferences
Backreferences \1, \2, ... correspondre le même texte comme un précédent capturing group. Useful pour matching repeated mots, paired delimiters, et palindromes.
TÂCHE
Utiliser regex caractère classes effectively
Caractère classes [...] correspondre any one caractère de un définir. Apprendre ranges, negation, shorthand classes, et escaping règles.
TÂCHE
Utiliser regex capturing et non-capturing groups
Groups (...) capture submatches pour backreferences et extraction. Non-capturing (?:...) group sans capturing. Named groups (?<name>...) improve readability.
TÂCHE
Utiliser regex lookahead assertions
Lookahead (?=...) et (?!...) assert quoi follows (ou doesn't follow) le actuel position sans consuming caractères. Zero-largeur assertions.
TÂCHE
Utiliser regex lookbehind assertions
Lookbehind (?<=...) et (?<!...) assert quoi precedes le actuel position. Supported en moderne engines (ES2018+, Java, .NET, PCRE).
TÂCHE
Utiliser regex quantifiers: *, +, ?, {n,m}
Quantifiers specify comment plusieurs times un motif repeats. Apprendre greedy, lazy, et possessive matching en avoid catastrophic backtracking.
TÂCHE
Valider SQL syntax before execution
Valider SQL queries for syntax errors before sending to the database. Catch typos, missing keywords, and structural issues early.
TÂCHE
Write un robust email validation regex
Email validation regex est notoriously complexe due en RFC 5322. Apprendre practical motifs pour commun utiliser cases et leurs limitations.
TÂCHE
Write phone nombre validation regex
Phone nombres vary wildly par country. Apprendre practical regex motifs pour commun formats et pourquoi un phone library est souvent better.
TÂCHE
Write un URL validation regex
URL validation regex doit handle protocol, domain, port, path, requête, et fragment. Apprendre practical motifs et quand en utiliser un URL parser instead.
TÂCHE

Questions fréquentes

What happens with catastrophic backtracking?
Matching runs in a Web Worker with a timeout. If it exceeds the limit, the tool reports a timeout instead of freezing the page. This protects against patterns like (a+)+ on adversarial input.
Which flags are supported?
Global (g), ignore case (i), multiline (m), and dotAll (s) can be toggled independently. The unicode (u) flag is enabled by default for correct handling of surrogate pairs.
How are capture groups shown?
Each match lists its full match text and numbered capture groups. Named groups (?<name>...) are displayed with their names.
Can I preview replacements?
Yes. Enter a replacement string (with $1, $2, $& references) and the tool shows the replaced output alongside the original, with diffs highlighted.
Which regex flavor is used?
The tool uses the JavaScript RegExp engine (ECMAScript). Lookbehind assertions (?<=...) and (?<!...) are supported in modern browsers. POSIX classes and PCRE-specific features are not.
Is my input uploaded anywhere?
No. All matching happens locally in a Web Worker. Your pattern and test text never leave the browser.

Outils associés