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

Find and Replace using GREP for $ sign from right to left of 2/3 digit number

New Here ,
Jan 23, 2024 Jan 23, 2024

Hello, 

 

Im looking for help making a grep code in the FIND AND REPLACE window that can move all "$000 and" amounts to "000 $". The number changes depending on what the savings amount is, so it can be a 2 digit number or 3 digit number. 

Ex. SAVE $40 to    40 $ DE RABAIS

Ex2. SAVE $150 to    150 $ DE RABAIS

 

Right now i have to manually move the $ sign to the right of all the savings amounts for our English to French translation process and its takes a long time. I looked for grep style examples that would work for this but havent had any luck yet.

TOPICS
How to
411
Translate
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

correct answers 1 Correct answer

LEGEND , Jan 23, 2024 Jan 23, 2024

I'm on my phone so just guessing:

 

(\$)(\d+)

 

$2[space of a kind you want]$1

 

Translate
LEGEND ,
Jan 23, 2024 Jan 23, 2024

I'm on my phone so just guessing:

 

(\$)(\d+)

 

$2[space of a kind you want]$1

 

Translate
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 ,
Jan 23, 2024 Jan 23, 2024

Your guess looks correct to me! I would suggest, Lindsey, that what you should want in between your value and your dollar sign is a non-breaking space, as I recall that starting a line with that trailing dollar sign would be incorrect in French typography. So your Change To: line should probably look like

$2~S$1

 

Translate
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
New Here ,
Jan 24, 2024 Jan 24, 2024

wow thank you so much.

So how would i use the Find and Replace window to find the current state and correct it to this new format? Im a bit confused.

 

Find what: ??

Change to: (\$)(\d+)

Translate
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 ,
Jan 24, 2024 Jan 24, 2024
LATEST

Find what: (\$)(\d+)

Change to: $2$1

Translate
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