Need to get the Prospect ID from the email body. But the usual split() method doesn’t work all the time. So switched to match() method, which returns the first occurrence of this pattern in the string. Example: This is the pattern , [Prospect:CUS234563]. Want to extract the “CUS234563” only. we first define a regular expression… Continue reading Extracting a pattern from a string using javascript