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

  1. Paste a few lines of your real text - a log excerpt, a column of ids, whatever you are trying to match.
  2. Highlight two or three examples of the part you want. Two beats one: the generalizer only widens as far as your examples justify.
  3. 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.
  4. Read the pattern. It is shown only after it has been tested to reproduce your highlights exactly.
  5. Copy it, or use it in the workbench's extract with regex step to pull it into a new column.

every tool in the box

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