I would like to get from an URL like these JUST the "firstname.lastname@example.org" (or whatever email will be in the URL) :
My problem is to solve that all of these 3 cases can happen
other data, OR data after
the email, OR data before
Unfortunately I have zero Regex-Skills, but was able to get so far together these 2 things:
The 1st one works if the email is the ONLY data.
The 2nd one works just if there is another data after my email.
But as mentioned I need to make it work regardless of which of the 3 types above is the case.
Could you help me out please?
Thank you very much!
BTW, I need it for this:
var msg = window.location.href.match(/email=(.*)/);
(I'm searching for an answer for more than 2 hours, used Google, used Regex-Testers, checked out Cheat Sheets and read many StackOverFlow-Questions... But I can't solve it on my own.)