Page 1 of 1

Search amounts in database dumps

Posted: Tue Jul 24, 2007 2:36 am
by CRAIGER
I am testing to see if Textpipe Pro can help us find amounts in database dumps.

The main problem is that an amount can have different format because different international formats.

Example:
230,000.00 (normal US Format)
230.000,00 (normal EU format)
230000.00 (abbr US format)
230000,00 (abbr EU format)

Now the dump files can look like:

1001|John Doe|3902,230,000.00,10101,new york,usa|

You see the problem with the format because the comma (,) before the amount value.
Now dumps have already been made in wrong format, so I have to deal with it.

The dump format is my problem and is not what this question is about, so ignore it.

I would like a general Pattern to search for all amount formats (both EU and US, general and abbr).
But also I would like to get this to a INT (numeric value) and then compare it, so for example i can search for orders above $10,000.00 US Dollars etc.

Any help, even short, is appreciated!

Thank you,

Craig

Posted: Tue Jul 24, 2007 4:36 pm
by DataMystic Support
You could try combining 4 separate EasyPatterns:

[ ( 1+ digits or comma, period, 2 digits ) or
( 1+ digits or period, comma, 2 digits ) or
( 1+ digits, period, 2 digits ) or
( 1+ digits, comma, 2 digits ) ]