Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Js

Idiom #83 Regex with character repetition

Declare the regular expression r matching the strings "http", "htttp", "httttp", etc.

const r = /htt+p/

Sugar for:
const r = new RegExp ('htt+p')
(def r #"htt+p")

New implementation...
< >
deleplace