Logo

Programming-Idioms

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

Idiom #83 Regex with character repetition

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

preg_match_all("/htt+p/", $r, $matches)

Problem: this doesn't check the "p"...
(def r #"htt+p")

New implementation...
< >
deleplace