I have the below RegEx to match email address
[-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+\.[a-zA-Z]{2,4}
AM trying to escape the characters as below but am still getting java compilation error. Could someone please help me to escape characters in the above RegEx?
String pattern = "\\[-0-9a-zA-Z\\.\\+_\\]\\+@\\[-0-9a-zA-Z\\.\\+_\\]+\\\.\\[a-zA-Z\\]\\{2,4\\}";