Made regex module optional dependency