Solved

search and replace

Posted on 2002-06-01
2
173 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
2 Comments
 
LVL 84

Accepted Solution

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

Author Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
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…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now