• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

GREP Styles Formatting help

Explorer ,
Apr 22, 2020 Apr 22, 2020

Copy link to clipboard

Copied

Hello all, I have some data that I need formatted, It looks like this

Screen Shot 2020-04-22 at 1.40.12 PM.png

 I need to reformat It using GREP styles to This

Screen Shot 2020-04-22 at 1.41.39 PM.png

 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              

TOPICS
How to , Scripting , Type

Views

215

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 22, 2020 Apr 22, 2020

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 )

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 22, 2020 Apr 22, 2020

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 23, 2020 Apr 23, 2020

Copy link to clipboard

Copied

LATEST

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines