Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7920423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:12:46+00:00 2026-06-03T16:12:46+00:00

I have a String in Java called Kiran<kiran@gmail.com> . I want to get String

  • 0

I have a String in Java called Kiran<kiran@gmail.com>. I want to get String just kiran@gmail.com by removing other content.

String s1= kiran<kiran@gmail.com>

Output should be kiran@gmail.com

Please help me out in solving this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:12:50+00:00Added an answer on June 3, 2026 at 4:12 pm

    If you are trying to parse email addresses, I’d recommend to use the InternetAddress class. It is part of Java EE (if you are using Java SE you need to add the javax.mail dependency).

    That class is able to parse an String containing an email address like yours.

    String s1 = "kiran<kiran@gmail.com>";
    InternetAddress address = new InternetAddress(s1);
    String email = address.getAddress();
    

    I think this way:

    • Your algorithm is automatically standards-compliant
    • Your code is cleaner than using regular expressions to extract the email address.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have file contents in a java string variable, which I want to convert
I have tried &nbsp;&nbsp; to display two spaces in a standard output Java String.
I'm new in Java I have a string which is get by StringBuilder from
MySQL has a connection string flag called allowNanAndInf . I have a java webapp
I have a simple java String object and wanna serialize/deserialize it, using XStream. Serialization
I have used the String Tokenizer in Java. I wish to know if there
I need C# equivalent to Java’s continue ? i have for (String b :
I have a performance problem related to string comparison (in Java). I'm working on
I have a Java model similar to: public class Country { @Id private String
I have some Java code which looks roughly like this: String urlString = ftp://polar.ncep.noaa.gov/pub/history/waves/multi_1.glo_30m.dp.200601.grb2;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.