fixed regex and process link function