0

Which string class is to use when we want to remove an email address from a string.

need help and i am a newbie in java.

thanks

shohag
  • 1
  • what do you mean, like get "email@example.com" from "my email address is email@example.com and my phone number is 555-123-4567"? – Jakob Weisblat Oct 04 '11 at 00:27

1 Answers1

0

You can use the String class. It has a few methods which are helpful, such as replaceAll, and replaceFirst.

You'll need a good regular expression to capture the email address part of the String. This might be helpful.

Christopher Perry
  • 38,891
  • 43
  • 145
  • 187