I am using reReplaceNoCase to parse links in an email to add link tracking to the url. The reg ex works but I need to use urlEncodedFormat() around the link that is added to the new url as the redirect param. It currently is using the sub expression returned form the regex (i.e \1) but I can't seem to use urlEncodedFormat() to encode it. Any ideas on how to achieve this?
emailContent = reReplaceNoCase(