I am using the follwoing regular expression
(".+@.+\\.[a-z]+")
Bit it accepts #@#.com as a valid email. What's the pattern I should use?
You should use apache-commons email validator. You can get the jar file from here.
Here is a simple example of how to use it:
import org.apache.commons.validator.routines.EmailValidator; boolean isValidEmail = EmailValidator.getInstance().isValid(emailAddress);
I would like a regular expression that will extract email addresses from a String (using Java regular expressions). That really works.
The following should be matched: AAA123 ABCDEFGH123 XXXX123 can I do: ".*123" ?
I have a string that has two single quotes in it, the ' character. In between the single quotes is the data I want. How can I write a regex to extract "the data i want" from the following text? …