Found infos about gsub, regexpr and ranges