modified regexp, new functions to parse links