functional shell modulo regexs