How can I extract only email addresses from a long string in Golang? For example:
"a bunch of irrelevant text fjewiwofjfjvnvkdlslsosiejwoqlwpwpwo
[email protected],ou=f,c=US
[email protected],ou=f,c=US
[email protected],ou=f,c=US
[email protected],ou=f,c=US
[email protected],ou=people,ou=f,c=US
[email protected],ou=f,c=US"
This would return a list of all the emails: [[email protected], [email protected], etc...]
Each email address would begin with "mail=" and end with a comma ",".