Regex Tester

Regex Tester

Comments & questions

What is a JavaScript Regex Tester?

A regular expression (regex) is a powerful pattern language for finding, validating, extracting, or replacing specific patterns in strings. JavaScript regex is widely used for email validation, phone number formatting, Korean (Hangul) text processing, URL parsing, and many other real-world tasks.

This free online regex tester lets you instantly verify JavaScript regular expressions in your browser. Simply type your pattern, set flags (g, i, m, s, u), and see real-time match highlights, capture groups, and replace results — no install or login required. Handy presets for email, phone, Korean characters, and more are included.

Key Features

Real-time Matching

Enter your regex and test string to instantly see highlighted matching results.

Capture Group Analysis

View detailed capture groups, index positions, and matched values for each match.

Replace Functionality

Instantly see the result of replacing matched patterns with your desired string.

Preset Patterns

Apply commonly used regex patterns for email, phone, URL, IP, Korean characters with one click.

How to Use

  1. Enter Regex — Type your regular expression pattern in the input field at the top.
  2. Set Flags — Enable flags like g (global), i (case-insensitive), m (multiline), s (dotAll), u (unicode) as needed.
  3. Enter Test String — Type the string you want to test against and see real-time matching results.
  4. Check Results — Review match highlights, capture group details, and replacement results.

Use Cases

Email & Phone Regex Validation

Test email regex patterns like [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} or phone patterns against real input to build reliable form validators.

Korean (Hangul) Regex Processing

Use [가-힣]+ to match Korean characters exclusively, or combine with \s and punctuation for full Korean text validation — useful for localized apps.

JavaScript Regex Debugging

Copy a regex from your JS/TS code, paste it here, and instantly see why it matches or fails — no need to run your app each time.

Log & Data Cleaning

Extract timestamps, IP addresses, or error codes from server logs, or strip unwanted characters from CSV data using find-and-replace with capture groups.

FAQ

What is a regular expression?

A regular expression (regex) is a formal language for defining and searching patterns in strings. It is supported by most programming languages and text editors, and is used for data validation, extraction, and replacement.

What are flags and what types are available?

Flags modify how a regex behaves. Common flags include g (global search), i (case-insensitive), m (multiline mode), s (dotAll - dot matches newline), and u (unicode support).

What are capture groups?

Capture groups are parts of a regex enclosed in parentheses (). They allow you to extract specific portions of matched strings and reference them as $1, $2, etc. during replacement.

Is this tool free?

Yes, it is completely free with no registration or installation required. Your input data is never sent to any server.

Does this tool support Korean (Hangul) regex patterns?

Yes, full Unicode and Korean regex is supported. Use [가-힣] to match Korean characters, [ㄱ-ㅎ] for consonants, or [ㅏ-ㅣ] for vowels. Enable the u (unicode) flag when working with emoji or supplementary characters. A 'Korean Characters' preset is built in for quick access.

Privacy Notice

This regex tester performs all processing in your browser. Your regular expressions and test strings are never sent to any server. You can safely test sensitive data.

Related Tools

Text CleanerText DiffCase ConverterCron Expression GeneratorWasm Module InspectorHreflang Matrix CheckerAST Query PlaygroundContainer Build GraphDependency Graph ExplorerSemver Range LabCron Schedule AuditorPatch Review WorkbenchSource Map ExplorerLocalization Catalog AuditorStructured Data ReviewerHTTP Archive AnalyzerWebhook Signature LabProtobuf Schema WorkbenchGraphQL Schema LabAvro Schema EvolutionLocal SQL WorkbenchSchema Form BuilderMesh Repair WorkbenchPipe Network LabRobot Arm Kinematics LabThermal Network LabBeam Response LabGear Train DesignerTolerance Stackup LabSensor Calibration FitPCB Stackup PlannerDigital Filter DesignerNetwork Reachability MapSun Shadow MapGPS Error SimulatorDigital Logic SimulatorAnalog Circuit LabMechanism Linkage LabAnalysis Mesh GeneratorOpenAPI Contract InspectorDatabase Migration PlannerDimensional Equation CheckerTruss Force LabBoolean Minimization LabControl Response LabQueueing Simulation LabGeofence Event SimulatorCoordinate Reference LabSurvey Traverse LabRaster Classification LabChoropleth Design LabMap Print ComposerRaster Reprojection LabElevation Contour MakerTerrain Viewshed LabWatershed DelineatorMap Tile PackagerText File Encoding WorkbenchFilesystem Portability AuditorSBOM License ExplorerFile Signature Auditornpm Lockfile Conflict ResolverSource Secret AuditorOffline Web Package BuilderCertificate Chain InspectorTorrent Metainfo InspectorChunked File PackagerEncrypted File VaultDuplicate File FinderArchive WorkbenchDesign Token ManagerSpacing Token DesignerResponsive Type SystemPackaging Dieline DesignerSVG Icon Sprite PackerFlex Layout PlaygroundCSS Grid PlaygroundRegex Equivalence LabMarkdown Repository AuditorLog Template MinerResponsive Layout AuditorEmail Template PreviewInternal Link GraphState Machine TesterPetri Net SimulatorGit History VisualizerCurl Request WorkbenchBinary Protocol DesignerHex File EditorBinary Patch WorkbenchFile Signature WorkbenchAPI Mock SandboxSchema Column MapperEvent Log SessionizerER Diagram DesignerTime Series Gap AuditorStratified Data SplitterData Lineage DesignerDecision Tree LabData Anonymization WorkbenchData Expectation RunnerJSON Schema ValidatorBasket Pattern AnalyzerRobots Policy TesterSEO HTML AuditorAccessibility Structure AuditorSyndication Feed WorkbenchIndexNow Payload BuilderCrawl Log AnalyzerCSP Policy WorkbenchSearch Performance AnalyzerCSV Formula Risk AuditorCORS Response SimulatorCache Header LabCookie Policy InspectorWeb Vitals Trace LabSitemap Health AuditorBatch File RenamerFile Manifest VerifierFolder Space MapFolder Difference ReviewerRoute Order OptimizerGeoJSON Map EditorPolygon Overlay LabCartographic Label PlacerSpatial Table JoinGeoJSON Topology AuditorGPX Track AnalyzerTrack Privacy RedactorCSV Table JoinCSV Pivot WorkbenchScientific Data ProfilerTabular Cleaning WorkbenchRecord ReconciliationData Dictionary BuilderCanonical Graph AuditorRedirect Plan TesterHTTP response and ping reference testBrowser and System InformationJSON ↔ YAML ConverterXML ↔ JSON ConverterHTML FormatterJavaScript MinifierMock Data Generator.gitignore GeneratorLicense GeneratorUser-Agent ParserPassword Strength CheckerCode to ImageXML FormatterHTTP Status Code LookupMIME Type LookupJS & SQL String EscapeCSS Box Shadow GeneratorCSS Gradient GeneratorIndent ConverterNumber Base ConverterUnicode Escape ConverterUnicode InspectorJSON Structure DiffMarkdown Table GeneratorBase64 EncoderJSON FormatterURL EncoderSQL FormatterUUID GeneratorHash GeneratorTimestamp ConverterJWT DecoderHTML Entity ConverterMarkdown PreviewCSS MinifierMeta Tag GeneratorJSON ↔ CSVImage to Base64
Explore all Dev Tools tools →Image/Media →Text/Convert →Life/Fun →