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

Selecting "all instances" characters with variable numbers at the end

Community Beginner ,
Jun 13, 2023 Jun 13, 2023

Hello! 

 

I have a 400page plus document and I would like to find all instances of "W: $??????" where the question marks are variable numbers, (for the sake of explaining here), up to 6 character but could be as few as 2 numbers. The "W: $" remain the same in all instances.

 

I need to find all of these instances and delete. Is there a way to find this when there are variable numbers at the end?

 

Thanks for helping!

TOPICS
How to , Type
542
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

Community Expert , Jun 13, 2023 Jun 13, 2023

So how about?

Find: 

W: \$\d+,?(\d+)?\.?(\d{2})? / 

(with a space before and after the slash at the end)

2023-06-13_18-10-23 (1).gif

 

But here's another idea. InDesign has a feature called conditional text. You could find the wholesale numbers as shown above and then assign a condition tag called wholesale that you can show and hide. That way you could have one document that has both sets of numbers, but at any point you can click off the eyeball for conditional text and it would hide the wholesale numbers automatically.

...
Translate
Community Expert ,
Jun 13, 2023 Jun 13, 2023

Find  W: \$\d{2,6}

Leave the change field blank

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 ,
Jun 13, 2023 Jun 13, 2023

Edit: This will find the first six digits in a seven-or longer sequence so if that's a problem you'll need to modify in some way.

In fact, you'll probably want to modify anyway to remove a space before or after the deleted text as well. Can you show us some examples of what the text looks like so we can suggest a way to do that?

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 Beginner ,
Jun 13, 2023 Jun 13, 2023

Here is what the text box looks like. There is a wholesale price and retail price. I need to remove the wholesale price and the slash and space after. Prices can vary from ones, tens and hundreds. Some don't have the .00 after the dollar amount. Thank you for your help!

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 ,
Jun 13, 2023 Jun 13, 2023

So how about?

Find: 

W: \$\d+,?(\d+)?\.?(\d{2})? / 

(with a space before and after the slash at the end)

2023-06-13_18-10-23 (1).gif

 

But here's another idea. InDesign has a feature called conditional text. You could find the wholesale numbers as shown above and then assign a condition tag called wholesale that you can show and hide. That way you could have one document that has both sets of numbers, but at any point you can click off the eyeball for conditional text and it would hide the wholesale numbers automatically. One more click would show them again.

 

~Barb

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 Beginner ,
Jun 13, 2023 Jun 13, 2023

Thank you!

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 ,
Jun 13, 2023 Jun 13, 2023
LATEST

You are welcome. I realized after setting it up that you don't get into the thousands so you could reduce it to:

 

Find:

W: \$\d+\.?(\d{2})? / 

(again a space before and after the final /)

 

~Barb

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