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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:05:38+00:00 2026-05-23T14:05:38+00:00

I am often dealing with list that users submit to a web site. A

  • 0

I am often dealing with list that users submit to a web site. A list usually looks like:

  1. Item
  2. Item

The pattern is usually a number followed by the separator (it can be “-” or “\” or “.” or any other typical separators). There can be one or more spaces between the number and separator and between the separator and the list item. Sometimes there is no number in front of the list item and in that case nothing needs to be done. Sometimes there is a number but no separator.

Is there a way to take out the number and/or the separator all together using regular expression?

  • 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-23T14:05:38+00:00Added an answer on May 23, 2026 at 2:05 pm

    This will match numbers and separators and the beginning of a line:

    ^\d+\s*[-\\.)]?\s+
    

    Use it to replace it with an empty strings (depends on the language you are using).

    You might have to add more characters to the character class, to match possible separators.

    Good source to learn regular expressions: http://www.regular-expressions.info/

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

Sidebar

Related Questions

I'm dealing with a LAMP web server. I have forms that users use to
Often while I'm dealing with LINQ sequences, I want to send each item to
In threads when dealing with cancelation, you often you see code like this while
Often, programmers write code that generates other code. (The technical term is metaprogramming ,
Often multiple applications share a large codebase of libraries that change often in development.
I use MySQLdb a lot when dealing with my webserver. I often find myself
I often find myself with code like private static final MyType sharedResource = MyType();
I want to know how most people are dealing with the repository pattern when
JQuery events are annoying me. The thing is that I very often use javascript
I am working on some C# code dealing with problems like moving averages, where

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.