Copy link to clipboard
Copied
Hello all, I have some data that I need formatted, It looks like this
I need to reformat It using GREP styles to This
There are THOUSANDS OF Records, Manually formatting is not an option.
I do realize that I wont be able to do it in on go, any help would be GREATLY APPRECIATED
here is the actual text for reference:
*0000003*2012* COMPANY NAME 000000000018756 R
*0000007*2012* SOMETIMES LONG NAME 000000000015819 R
Copy link to clipboard
Copied
Hi,
that's nothing a GREP Style can do.
You need to use GREP Find/Change. Perhaps several runs.
Hm, do you know what currency your source is showing?
Could that "R" indicate "Rupees" ( India ) ? ( 1 $ is about 76 INR )
Also make clear if you need a comma or a dot for separating the thousands in the result.
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi, Thanks for your reply, The R as well as the *2012* and any asterisk is going to be deleted, definitely using the regular find replace. Dots will be added as in the image example.
Copy link to clipboard
Copied
Try this. It assumes there are no zeros in the company name section.
Grep find what:
^\*(\d+)\*(\d{4})\* ([^0]+?) *0+(\d+) R *$
Change to:
$1 $2 $3\t\$$4