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

The Archive Base Latest Questions

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

INPUT : There’s string that numbers, and a string, dots and spaces. Notice that

  • 0

INPUT : There’s string that numbers, and a string, dots and spaces. Notice that e defines a the separator between the numbers.

e.27.3.90.. .e 3.50 2.30..e2.0.1.2. .50..

OUTPUT : I want to remove all the spaces and those extra dots except for the one that makes up following and add a , before e,

,e273.90,e3502.30,e2012.50
  • Best catch was this How to remove extra decimal points?. But it’s based on Javascript parseFloat().

  • I also saw this post : Convert to valid decimal data type. But that’s in terms of SQL and pretty much using multiple replace().

PS: There are so many posts regarding regex in various kind. I tried to build one, but seems like no success so far.

  1. Please propose any efficient one shot regex or ideas.
  2. Would like to hear the performance gain/loss of this regex vs multiple replace()

Here is the code I have been gasping ;)..:

      List<string> myList;     
      string s = "";     
      string s2 = "";          
      string str = "e.27.3.90..bl% .e 3.50 2.30. #rp.e2.0.1.2..50..y*x";
      s = Regex.Replace(str, @"\b[a-df-z',\s]+", "");                               
      myList = new List<string>(Regex.Split(s, @"[e]"));
  • 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-16T20:40:19+00:00Added an answer on June 16, 2026 at 8:40 pm

    Last str is your result

         string str = "e.27.3.90..bl% .e 3.50 2.30. #rp.e2.0.1.2..50..y*x";
         str = Regex.Replace(str, "[^e^0-9]", "");
         str = Regex.Replace(str, "([0-9]{2}?)(e|$)", ".$1,$2");
    
         //str = "," + str.Substring(0, str.Length - 1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there away to make sure that all digits inside a INPUT#barcode start with
Is there a bash command that takes as input a file path and returns
I have a text box. I want to take user input from there and
I want to split a string based on a non-regular expression. My input is
I have an Ext.grid.Panel and i want to validate user input: there is a
I have a enrollment form where users have to input there address. I am
Is there a input class to deal with [multiple] large XML files based on
Is there any way to disable all input fields in an div container with
Is there anyway we can take input from command line in Objective-C, the way
is there a way to get user input like an inputbox in c#? i

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.