script for automatic table filtering

Hello everyone! i I'm trying to write a script that can filter data in a text file.

the source file looks like this

the result file should look like this

As you can see mostly i need to delete fields like _219402757693 and date - time 12.07.2012 8:49:06

i know that it's possible to filter text with awk or cut. but the problem is that:

  1. mobile number and amount are in different columns in each block of tables which are much bigger that this sample.
  2. number and amount in some tables are amount and number
  3. amount can be a number from 3 (300) to 7 symbols (3000.00)
  4. some numbers 7XXXXXXXXXX (11 digit format) some are 7XXXXXXXXX (10 digit format) but result should be 11 digit format
  5. commas need to be replaced with dots. (found how to do it with sed)

I was googling for about a week and reading about awk, sed and other text processing/editing commands, but didn't find solution which will work

My main problem is to filter out fields like _219402757693 and date - time 12.07.2012 8:49:06

HELP ME PLEEEEEEEEEEEEAAAASE!!!!!!:wall::wall::wall:

Thank you!!!!:slight_smile: