fork(4) download
  1. local function extract(text)
  2. return string.match(text, "^[%w%s_-]*%w")
  3. end
  4.  
  5. print(extract("mar_paci (toto totot)"))
  6. print(extract("toi-re/3.9"))
Success #stdin #stdout 0.01s 5488KB
stdin
Standard input is empty
stdout
mar_paci
toi-re