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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:40:38+00:00 2026-05-19T02:40:38+00:00

i have a huge file and as an output some columns doesn’t have a

  • 0

i have a huge file and as an output some columns doesn’t have a value, i need to fill these columns with 0 for further analysis. I can separate the columns with space or tab, now below it is seen separated with tab.

alt text

  • 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-19T02:40:38+00:00Added an answer on May 19, 2026 at 2:40 am

    This is really a job for a CSV parser, but if it has to be a regex, and you never have tabs within quoted CSV entries, you could search for

    (^|\t)(?=\t|$)
    

    and replace with

    $10
    

    So, in Perl:

    (ResultString = $subject) =~ 
    s/(    # Match either...
       ^   # the start of the line (preferably)
       |   # or
       \t  # a tab character
      )    # remember the match in backreference no. 1
      (?=  # Then assert that the next character is either
       \t  # a(nother) tab character
       |   # or
       $   # the end of the line
      )    # End of lookahead assertion
    /${1}0/xg;
    

    This will transform

    1   2       4           7   8
        2   3       5   6   7   
    

    into

    1   2   0   4   0   0   7   8   
    0   2   3   0   5   6   7   0
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a huge file (~26 MB) with around 200 columns & 30000 records.
a. i have a huge SVG file 2. i have objects in the SVG
This is one of the entries I have in a huge XML file of
I have to read a huge xml file which consists of over 3 million
I have a single huge minified JavaScript file (ditto for CSS). I am looking
I have a huge (400MB) initial_data.json file. Django's eating up all my memory trying
I'm supposed to do the fallowing: 1) read a huge (700MB ~ 10 million
Is there a way to query via WMI in C# like you can do
Hello another question concerning debugging : Automatically generating test cases when i know the
What is significance of zlib.output_compression in zip functionality? Should it be on or off?

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.