I am trying to extract a certain portion of string from a main string. For example, I have the following string.
A receipt is sent to abc@gmail.com. Please keep it for your own reference.
I just want to extract
abc@gmail.com
from the string.
From the solutions I found, it utlises the "count" of index from beginning of the String up to the beginning of the email section of the string, and from after the email section to the end of the string. However, I think this only works if the number of characters in the email is fixed. Unfortunately, mine here is dynamic, which means the string remains the same except that the email will be populated with the email that the user keyed in. Kindly advise.