I get the list of email addresses in the servlet as a parameter from the request in the following format:
,Group 4: [abc@xyz.com,asd@dsa.com],,Group 4: [abc@xyz.com],,Group 3: [],,Group 2:
[qwe@rty.com,yui@gui.com,jih@app.com,abc@xyz.com,asd@dsa.com],,Group 1:
[pick@pick.com,test@pick.com,test1@pick1.com],,Nirmal testGroup: [qwe@rty.com],
How can I parse all unique email addresses from this in Java?
Group names are not important. It is also not necessary that the name of the group always be like Group 1, Group 3, it can be anything containing spaces. Just need to have a list / array of all unique email addresses from the string.
source
share