asked on
Help with Regex
HI im trying to extract this url from an email using regex. My Regex string is
/href=\"(https:\/\/www.linkedin.com\/e\/v2\/S+)/g
The string I'm looking for is:
href="https://www.linkedin.com/e/v2?e=4mwol-kx0cskhe-b2&lipi=urn%3Ali%3Apage%3Aemail_email_jobs_new_applicant_01%3BQXTCX4qcT7OfUsLaH3cuLA%3D%3D&t=plh&midToken=AQG80kTcNtwiXA&ek=email_jobs_new_applicant_01&li=0&m=email_jobs_new_applicant&ts=job_posting_download_resume&urlhash=dt4R&url=https%3A%2F%2Fwww%2Elinkedin%2Ecom%2Ftalent%2Fapi%2FtalentResumes%3FapplicationId%3D8549340446%26tokenId%3D1524127108%26checkSum%3DAQGg2sABm2nopxlP8EhnWBw3EtcLXz1U"
My issue is the string href="https://www.linkedin.com/e/v2 is used a few times in the email so the regex is flawed. It matches up to three times
I have some options to consider, Can i have regex stop after it finds 1 match? Or can i add that it must contain the string download_resume?
Language is Javascript
thanks in advance
https:\/\/www\.linkedin\.com
Make that change and see what happens.
\/S+
Maybe you meant\S+