Logo

Programming-Idioms

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

Idiom #83 Regex with character repetition

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

r = "htt+p"

not a regular expression, but a lua pattern usable in string.gmatch for exemple
(def r #"htt+p")

New implementation...
< >
deleplace