It can also sign only a portion or a subset of an XML document rather than the entire document.An IP address is of the format [0-255].[0-255].[0-255].[0-255], so a regular expression with this format should serve the purpose, or the IP address string can be split using the String.split(...) and a check can be added.Its only to help the user writing the correct address. Most times you just want to validate that the user entered the email in the right format. So I like this better than the original answer but a Septik's answer is comprehensive and I up-voted that as well.
This uses the Internet Address class which has most of the RFC mail address checks implmented.
They can get ridiculously convoluted as in the case above and, according to the specification, are often too strict anyway.
If you actually check the Google query I linked above, people have been writing (or trying to write) RFC-compliant regular expressions to parse email addresses for years.
This article will give you an overview of XML signatures and show you how to use the API in your applications.
as "a value computed with a cryptographic algorithm and appended to a data object in such a way that any recipient of the data can use the signature to verify the data's origin and integrity." JDK 6 includes a cryptographic digital signature API that is described in more detail in a lesson on the security trail in the Java Tutorial.