Solved

search and replace

Posted on 2002-06-01
2
205 Views
Last Modified: 2010-03-05
Hi:

I have a pattern like this

"1,885,5002,666,59026."

and i want to separate out as
"1,885,500"  "2,666,590" and "26."

basically it should split the 3 groups depending on
the property a comma can split a max of 3 chars.

right now I am searching for [0-9]\{4,9} which
highlights the 5002 and 59026 in the above example.

Can somebody please enlighten me how I can split it
into those 3 groups?

This above pattern is part of this string

A 26.37 1,885,5002,666,59026.1326.00 - 26.79
which is a stock price for the day.

Thanks
0
Comment
Question by:mbormann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 100 total points
ID: 7048962
s/(\d{3})(?=\d)/$1 /g;
0
 
LVL 5

Author Comment

by:mbormann
ID: 8096967
Sorry I clean forgot about this one. Thanks for the answer!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

761 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question