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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:46:51+00:00 2026-06-07T15:46:51+00:00

In javascript and/or node.js, how to write a regular expression for the following purpose:

  • 0

In javascript and/or node.js, how to write a regular expression for the following purpose:

1) The text must contain at least one line and must not exceed 10000 lines.

2) Each line is made up of a string followed by an integer. The string alphabet is limited to “ACGTN”, and its length must be at least 1 and at most 64. The integer must be within 0 to 9, i.e. length must be 1.

Here is an valid example:

ACCCGTTNNGTCCGGA3
ACCCGTTNNGTCCGGATTGAANNGT9
TTGGACCNAC0

Here is an invalid example: (contains out-of-alphabet character)

BACGGTA0

Another invalid example: (no integer at the second line)

ACGGTA0
TTGGACCNAC

Another invalid example: (string longer than 64 characters)

TTGGACCNACACCCGTTNNGTCCGGATTGAANNGTTTGGACCNACACCCGTTNNGTCCGGATTGAANNGTTTGGACCNACACCCGTTNNGTCCGGATTGAANNGT2
  • 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-07T15:46:53+00:00Added an answer on June 7, 2026 at 3:46 pm

    If you want to validate all the file using a regular expression, use this one:

    ^([ACGTN]{1,64}\d\n){0,9999}[ACGTN]{1,64}\d$
    

    Blender’s answer is good too, but it is only for one line

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following: <html> <body> <script type="text/javascript"> document.write('Hello\nWorld') </script> </body> </html> As you
I have a JavaScript data structure like the following in my Node.js/Express web app:
The novice understanding of Node is that if I re-write synchronous, or in-line code,
I want to write some javascript classes which inherit from the DOM Node interface...
Currently, I'm using regex in Javascript / Node via find() and that works for
A web app I am writing in JavaScript using node.js. I use Foreman, but
How can i process a coffeescript code directly into javascript in node.js ? maybe
I understand how to use Protoype in standard Javascript with Node.js and modules, but
How to find the parent of an ASP.NET TreeView node in JavaScript?
I'm using the Javascript SDK inside a node.js (Express) App. Connecting Users works fine,

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.