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 3442386
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:39:45+00:00 2026-05-18T08:39:45+00:00

I have a string with _ separator like A_B_C_D_F . I want to fetch

  • 0

I have a string with "_" separator like "A_B_C_D_F". I want to fetch the value after the 2nd “_” separator to 3rd separator. In this example the value will be "C".

Please help me to do this in efficient way.

  • 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-05-18T08:39:45+00:00Added an answer on May 18, 2026 at 8:39 am
    String value = yourString.split("_")[2];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a comma-separated string in an ant property, like this: <property name=prop value=a,b,c/>
I have for example this string: iCanSeeBluePeople and I need it to separate it
question related to this I have a string a\;b\\;c;d which in Java looks like
I have a string with data like this: 8487613 1298296324 1a6ad892e547da07f35221fdfe6f70dd |MoDo| 178.211.28.126 Battlefield
I have list of strings like this FirstName-Lastname (separated by a dash -) I
I have a long string separated with ordinal numbers. For example: 1. Good morning
I have a string which contains binary digits. How to separate string after each
What I want to do may seem like a weird scenario. Please keep in
Say I have a class like so: public class Work { public string Name;
I have a large (~100GB) text file structured like this: A,foobar A,barfoo A,foobar B,barfoo

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.