I am new to regex. I am checking email ids using regex.
Following is my code to match <[email protected]>
with [email protected]
Pattern p = Pattern.compile("\\<(.*?)\\>");
Matcher m = p.matcher("<[email protected]>");
And its working fine. Now I want to match either <[email protected]>
or [[email protected]]
with [email protected]
.
Any suggestion will be appreciated.