generate a regex from examples by highlighting them
Paint the parts of your sample text you want to match and get a regular expression back - one that is verified to reproduce exactly your highlights before it is ever shown to you. No regex syntax required to start; real regex out.
how to use it
- Paste a few lines of your real text - a log excerpt, a column of ids, whatever you are trying to match.
- Highlight two or three examples of the part you want. Two beats one: the generalizer only widens as far as your examples justify.
- Set match to say how literally to read the paint: this text for a constant, same shape for capitals-then-digits in the order painted, or any letters/numbers for any run of the same kinds of character, any length and any case.
- Read the pattern. It is shown only after it has been tested to reproduce your highlights exactly.
- Copy it, or use it in the workbench's extract with regex step to pull it into a new column.
- Two or three paints beat one: the generalizer widens only as far as your examples justify.
- Candidates climb a ladder - literals, character classes, boundaries - and every rung is tested.
- match picks which rung to ask for. Painting the same word twice otherwise reads as a constant, which is right for
status= and wrong for a city name; any letters/numbers says you meant the kind of thing, not the thing.
- Splitting a delimited column is a job for the workbench's split at delimiter step, not a regex - click the column header there.
- Copy the pattern, or use it directly in the workbench's extract-with-regex step.
- Works on logs, IDs, dates, prices - anything with visible structure.
every tool in the box
- data workbench - profile, clean, transform, and export CSV, JSON, and SQLite - the full suite
- JSON flattener - nested JSON or NDJSON to flat columns, arrays and objects unrolled
- CSV PII scrubber - find emails, phones, SSNs, and card numbers - mask, hash, or drop them
- JSON to CSV - convert JSON or NDJSON to CSV with full column control
- CSV to JSON - convert CSV to JSON or NDJSON, streamed at any size
- Excel to CSV - read .xlsx workbooks and export CSV, sheets and all
- CSV to Excel - write a real .xlsx where leading zeros and dates survive
- SQL on CSV - real SQL over your files: joins, GROUP BY, a read-only console
- CSV to SQLite - drop several files, get one .sqlite database with discovered foreign keys
- CSV to SQL - CREATE TABLE and INSERT statements for Postgres, MySQL, SQL Server, SQLite
- JSON to TypeScript - TypeScript interfaces and JSON Schema derived from your real data
- large CSV viewer - open files past Excel's 1,048,576-row limit without loading them into RAM
- regex painter - highlight example matches, get a verified regular expression back (this page)
- encoding fixer - detect windows-1252/UTF-16 and repair garbled text (José → José)
- log parser - read log files as events: layouts detected, stack traces kept whole, timestamps normalized, and a volume-over-time strip drawn in SQL across every row
- visualize - chart any table you have open - bar, line, area or point - drag across it to filter, and export svg, png, or the vega-lite spec that drew it
- theme builder - design, test, and export custom color themes with live previews, palette derivation, and contrast diagnostics
Like every unfckr tool, this runs 100% in your browser: no upload, no servers, no signup, no analytics. A Content-Security-Policy header blocks every programmatic network channel, so not even malicious code could phone home - and you can watch it happen: the privacy page runs six live escape attempts and shows the browser refusing each one.
↑ back to the tool