problems with numbers and digit grouping! big problem...

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

jhh3000
Posts: 1
Joined: Tue Feb 15, 2005 5:55 pm

problems with numbers and digit grouping! big problem...

Postby jhh3000 » Tue Feb 15, 2005 6:13 pm

I am trying to parse some information, but noticed a roadblock that I have spent three hours on and have not yet solved: how is it possible to find, in a pattern, a variable-digit number that has digit grouping?

For example (taking a simple find and replace utilizing the EasyPattern language),

A few of the values that appear in the text document I'm parsing show up (exactly) as:

2112493 2112493 4823 4823 29 29

And if I were to do a simple easypattern find [oneOrMore digits] replace $0, I would end up with:

2112493, 2112493, 4823, 4823, 29, 29,

Which is great and all, but in reality, most of the values that appear in the document show up as:

2,112,493 2,112,493 4,823 4,823 29 29

And I am stumpted as to how to write a find algorithm that would treat each number as one entity, and letting me put a comma or whatever I wanted after each number.

User avatar
DataMystic Support
Site Admin
Posts: 2138
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Wed Feb 16, 2005 11:40 am

Can you please address your questions to email OR the forums, not
BOTH?

EasyPatterns default to the shortest match, so you need to use

[ longest 1+ digits ]

Unless the rest of the pattern forces it to make a longer match e.g.

[ 1+ digits, whitespace ]

Would force a longer match.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 5 guests