Image for post
Image for post
Photo by — @rldgs

English to Regex thanks to GPT-3?

Perhaps you can spend less time searching for regular expressions online — check out this demo

This is a short article about one possible feature resulting from the new GPT-3 by OpenAI based on a prototype-demo posted on Twitter. I realise not everyone knows what ‘regex’ is, so I thought I would explain. A “regular expression” (regex) is a sequence of characters that define a search pattern. Usually such patterns are used by string-searching algorithms for “find” or “find and replace” operations on strings, or for input validation. It is a technique developed in theoretical computer science and formal language theory.

Image for post
Image for post
Image for post
Image for post
  1. Provide an example of a string that will match.
  2. Generate the regex.

Written by

AI Policy and Ethics at www.nora.ai. Student at University of Copenhagen MSc in Social Data Science. All views are my own. twitter.com/AlexMoltzau

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store