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

  • SEARCH
  • Home
  • 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 9259485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:40:09+00:00 2026-06-18T12:40:09+00:00

I have to separate a value from a .txt file. I created a LineNumberReader

  • 0

I have to separate a value from a .txt file.
I created a LineNumberReader and used the .split(“\t”) to separate the words, but I only need the second last value (q-value).
Is there an option to specify the .split()?

This is my .txt file

test_id gene_id gene    locus   sample_1    sample_2    status  value_1 value_2 log2(fold_change)   test_stat   p_value q_value significant
XLOC_000001 XLOC_000001 TC012951    ChLG10:20399-27664  naive   BttO    NOTEST  0   0.0498691   1.79769e+308    1.79769e+308    0.210754    1   no
  • 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-18T12:40:10+00:00Added an answer on June 18, 2026 at 12:40 pm

    You can use the String#split(String regex, int limit) method, to stop splitting after the column you wish to extract and get the String you want in one line of code:

        String line = "A\tB\tC\tD\tE\tF"; // tab separated content
        int column = 3; // specify the column you want (first is 1)
        String content = line.split("\t", column + 1)[column - 1]; // get content 
        System.out.println(content);  // prints C (3rd column)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to load data from a .txt file with PHP, but I fail
I have an object that has 3 separate Dictionaries. The value parameter for each
Do I need to have separate/multiple workers to run multiple websites (each with a
I have .txt files that contain the output from a data logger. The data
I have a problem regarding my simple application I have 2 separate .JSP file
I have a text file, say, input.txt and I want to run a command
I have a .txt file which has about 500k entries, each separated by new
I have been able to extract certain lines from a large tab-separated text file
i have a function what separate my file's content. Example file: 001;text1 002;text2 003;text3
I have a file that can contain from 3 to 4 columns of numerical

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.