local function extract(text) return string.match(text, "^[%w%s_-]*%w") end print(extract("mar_paci (toto totot)")) print(extract("toi-re/3.9"))