Skip to content
PatternBenchBY SMARTFACT

FREE JAVASCRIPT REGEX WORKBENCH

Test the pattern. See the match.

Test a regular expression against exact sample text. Explore matches, captures and syntax explanations, preview replacements, extract values and check expected cases, entirely in your browser.

Free to use. No account, email address or trial. Your work stays in your browser.

PATTERN / TEST EXAMPLE

Sample item codes

AB-0042
CD-0107

2 matches · prefix and number captured
2Matches2Test cases0Uploads

Illustrative results from the Item codes example. Pattern matching checks text structure, not whether an item exists.

MADE FOR DEVELOPERS AND INTEGRATORS

For developers, integrators and people testing item-code patterns, extracting values from sample text or checking a replacement before using it in another system.

A USEFUL STARTING POINT

One matching example is only the beginning.

A pattern may accept a good item code and still accept a bad one, miss a line boundary or replace more text than expected. PatternBench keeps the sample, captures, replacement and positive/negative examples together, with the JavaScript dialect and limits stated.

FROM SAMPLE TO ANSWER

Enter. Inspect. Use.

  1. 01

    Enter the pattern and sample

    Use JavaScript regex syntax without surrounding slashes. Choose flags explicitly, or start from an example.

  2. 02

    Run and inspect

    A disposable worker finds matches and captures, highlights the sample and previews replacement text. A slow run can be stopped.

  3. 03

    Check the edge cases

    Add values that should or should not contain a match. Run again, then copy replacement output or download the matched values and case results.

WHAT IT DOES

Useful details, in plain view.

  1. 01

    Matches with exact positions

    See whole matches, named and numbered captures, unmatched optional captures and zero-based UTF-16 offsets.

  2. 02

    Replacement preview

    Use JavaScript replacement tokens such as $&, $1 and $<name>. The sample stays unchanged, and replacement text is never executed as code.

  3. 03

    Positive and negative examples

    Each test value starts with fresh regex state. See whether it contains the expected match.

  4. 04

    A stoppable worker

    Execution stays away from the page. Every run is terminated after completion, edits, cancellation or the 1.5-second work limit.

  5. 05

    Understand the syntax

    Read parser-based explanations of capture groups, character classes, repetitions, assertions and backreferences. This describes syntax rather than an engine execution trace.

  6. 06

    Extract and reuse

    Export whole matches or selected captures as text, CSV, JSON or JSON Lines. Generate a JavaScript matching or replacement snippet with your exact pattern and flags.

  7. 07

    Resume your work

    Save the pattern, sample, replacement and cases as a local project file, then reopen it later. No account or upload is needed.

  8. 08

    Run as you type

    Enable optional evaluation after a short pause between edits. Edits cancel older work; Stop also switches live mode off.

WHERE YOUR WORK IS KEPT

In this tab, until you copy or download it.

Work stays in memory while the tab is open. It is not saved automatically or uploaded. Refreshing or closing the page discards it. Copying writes to your clipboard and downloading creates a local file; those copies can outlive the tab.

WHEN CHECKS REPEAT

From a useful check to everyday work.

These SmartFACT services handle work that repeats across a team or on each job. The workbench remains free and independent.

Invited trial

LabelRules

When label checks must repeat for each job, LabelRules turns requirements described in plain English into approved selection and value-check rules. It starts with an invited trial. PatternBench does not publish rules into it.

Early access

KitProof

When expected components depend on order data, KitProof builds checklists from approved plain English rules and checks each scan against them. It is in early access, with scope agreed at onboarding.

BEFORE YOU START

A few practical answers.

Is it free?

Yes. Every supported check, edit, preview and export is free, without an account, email step or trial.

Which regex dialect does it use?

The current browser’s JavaScript RegExp, with g, i, m, s, u and y flags. Results do not certify compatibility with PCRE, .NET, database regex engines or another browser version.

Does a matching value pass a business check?

It passes only the pattern’s matching behaviour in this browser. A matching email address, item code or identifier is not proof that it exists, belongs to someone or meets your full requirements.

Does replacement change my original text?

No. It produces a separate preview. An empty replacement deletes matched text only in that preview, and g controls whether replacement covers all matches or the first one.

What happens if a pattern runs too long?

The worker is terminated after the work limit and the page keeps your input. Simplify the pattern or shorten the sample, then run a fresh worker.

Can I use PCRE or a backtracking debugger?

This version uses JavaScript only. Syntax explanations describe the parsed expression, not a step-by-step engine trace. Other engines, dialect conversion and debugger pipelines are not included.

What are the limits?

Patterns and replacement text are limited to 4,096 UTF-16 code units each; samples to 100,000. Up to 1,000 matches and 64 capture groups are supported, with 200,000 retained text/output code units. Cases are limited to 50 values of 2,000 code units each. Highlighted preview shows 6,000 sample code units and the table 100 matches; complete results are used for replacement and export. The engine is the current browser’s JavaScript RegExp, not PCRE, .NET or another dialect. Matching a shape does not prove that a real-world value exists. Syntax explanations show up to 512 elements. Project files are limited to 1.5 MB. Generated snippets do not include the workbench’s worker or result limits.

What happens to my data?

Patterns, sample text, replacement text, cases and results stay in this tab’s memory. Workers run on this device and are discarded after completion, edits, cancellation or the execution limit. Nothing is uploaded, put in a page address or saved automatically. Refreshing or closing the tab discards the work. Clipboard copies, extraction exports, generated code and project files can contain your actual values. Opening a project reads the selected file locally and replaces the workbench only after validation. The tool has no analytics; these public pages offer optional suite analytics separately.

ONE SMALL JOB, DONE WELL

Test the pattern. See the match.

Open the free workbench, or start from an example.

Test a pattern →

THE SMARTFACT SUITE

Practical tools. Useful on their own.
Better around the same floor.

Automate factory decisions with rules you describe in plain English. Explore focused SmartFACT services, plus free tools for everyday checks.

Invited trialSuggested next step

LabelRules

Describe label rules in plain English. Automatically select layouts, resolve customer codes and check each job before printing.

Explore LabelRules ↗
Early access

KitProof

Turn plain English component rules into automatic kit checklists, then check scans against the expected parts and quantities.

Explore KitProof ↗
Early access

WorkSteps

Turn plain English rules into automatic step selection for each unit, with required evidence and a record of completed work.

Explore WorkSteps ↗
Early access

FactorySpec

Apply approved product rules and calculations automatically to turn dimensions and options into manufacturing requirements.

Register early-access interest ↗
Early access

SmartFACT Data

Maintain reference tables with ConfigSheets or bring shop orders into SmartFACT through reviewed connectors. Check changes and deliver data to the products that use it.

Explore SmartFACT Data ↗
Early access

ParcelOffice

Scan the work order and the parcel choice to book the courier and print the labels. Approved plain English rules recommend or choose the parcel.

Explore ParcelOffice ↗
Early access

RefillFlow

Scan an empty container to send the right refill request to stores. Approved plain English rules set the stores queue, priority, ticket printer and escalation.

Explore RefillFlow ↗
Early access

RemnantRack

Label each offcut, find a suitable length before cutting new stock and record what you used. Approved plain English rules decide what to keep and where it goes.

Explore RemnantRack ↗
Invited trial

ToolCustody

Check a shared tool before handover, record who has it and keep damaged or overdue tools out of the next issue. Explore an invited trial for one factory crib.

Explore ToolCustody ↗
Invited trial

StoresFlow

Receive, put away, reserve and issue stores material with barcode checks, keeping held, reserved and available stock apart. Explore an invited trial for one stockroom.

Explore StoresFlow ↗
Invited trial

LotTrail

Follow a lot or serial number through the records your factory already keeps, with the source of each link and the gaps shown. Explore an invited trial with two declared sources.

Explore LotTrail ↗
Early access

CheckStation

Scan an identified unit to get its approved final-inspection checks, then record exact readings with their result, holds and release history.

Register early-access interest ↗
Invited trial

ReclaimStation

Book returned units in, recover and label the usable parts, release them independently and record the unit each goes into. Explore an invited trial for one product family.

Explore ReclaimStation ↗
Free tool

ScannerBench

See the text and key events your keyboard scanner sends. Compare them with the value you expected.

Test a scanner ↗
Free tool

PrintBench

Print a known PDF, measure its reference marks and compare scans from the printed codes.

Check a print ↗
Free tool

CardBench

Create 100 × 50 mm bin and rack cards with Code 128 or QR, from one record or a CSV.

Make bin cards ↗
Free tool

CountBench

Count stock by location with a barcode scanner, compare it with a stock file and export the results. No account needed.

Start a free count ↗
Free tool

BarcodeBench

See exactly what a scanned barcode contains, with hidden characters shown and GS1 fields, check digits and dates explained. No account needed.

Inspect a barcode ↗
Free tool

MatchBench

Scan a reference and each label, see an exact match or the first difference, and download the results. No account needed.

Start a free comparison ↗
Free tool

TagBench

Scan an item or location, note what needs attention, print a review tag and keep a review list. No account needed.

Make a free tag ↗
Free tool

FindBench

Load your own parts and locations CSV, scan a code and see every location it lists. No account needed.

Start a free lookup ↗
Free tool

ManifestBench

Check cartons, pallets or serial numbers against a list with a phone or scanner and see what is missing. No account needed.

Start a free check ↗
Free tool

FeedBench

Check CSV and JSON files exactly as written, preview a column mapping and compare two versions by key. No account needed.

Check a file free ↗
Free tool

CycleBench

Time work cycles and changeovers on a phone, record interruptions with reasons and download the results. No account needed.

Start a free study ↗
Free tool

OffcutBench

Label the offcuts on your rack, find a piece long enough before cutting new stock and record what you used. No account needed.

Track offcuts free ↗
Free tool

TraceBench

Load one or two CSV exports and follow a lot or serial forwards or backwards, with the row behind every link. No account needed.

Start a free trace ↗
Free tool

ReclaimBench

Record the parts recovered from each return, label them with a QR code, check them and record the unit each one goes into. No account needed.

Track recovered parts free ↗
Free tool

GuidBench

Generate GUIDs, UUID v4 and v7, ULIDs and Nano IDs, format and download batches, or inspect a UUID in your browser. No account needed.

Generate identifiers ↗
Free tool

OctetBench

Inspect and edit text, hex, Base64 and binary bytes in your browser, reveal hidden characters and compare byte sequences. No account needed.

Inspect some bytes ↗
Free tool

PatternBench

Test JavaScript regular expressions in your browser, inspect matches and captures, preview replacements and check expected cases. No account needed.

You are here
Help

SmartFACT Help

Step-by-step guides and interactive demonstrations for the SmartFACT suite. Read the instructions, watch a task or practise with real product screens and sample data.

Open SmartFACT Help ↗