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

Find and delete all numbers in a document

Explorer ,
Oct 25, 2023 Oct 25, 2023

Want to delete all numbers in a document.

I have tried the find function, 

but I want all the numbers deleted and the body of the text moved to where the white space of the deleted number is.

 

When i use the find function, and replace with Em white space, it finds and deletes all numbers, but the text is no longer alighned because there is unwanted white space to the left of the text (where the number was).

 

How do i delete all numbers and shift the text to the left so it remains perfectly alighned?

 

 

TOPICS
How to
895
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 ,
Oct 25, 2023 Oct 25, 2023

Find numbers and replace with nothing... No whitespace will be created and your text will move left.

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 ,
Oct 25, 2023 Oct 25, 2023

And if you really mean every digit, you can use the GREP wildcard \d to represent all digits from 0 to 9. Use that for search, and an empty 'replace' string as Peter notes, and all the numbers will vanish instantly. 🙂

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
Explorer ,
Oct 25, 2023 Oct 25, 2023

Thanks that works.

The problem though is that there is 1 extra space between the number and paragraph as well, ie:

1 The ...

 

The text is shifted left for the deleted number, but how do I shift it left and aditional time for the extra white space between number and paragraph?

 

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 ,
Oct 25, 2023 Oct 25, 2023

Include the space. Use '\d ' as the search term. (Note the space included, there.)

 

You can also search for '\r ' (Again, note the space), and replace it with just '\r' to replace every space following a paragraph return.

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
Explorer ,
Oct 25, 2023 Oct 25, 2023

Thanks. This works. Running '/d ' removes the digit and white space. I then run it a second time with '/d' to remove the remaining numbers from double digit numbers.

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 ,
Oct 25, 2023 Oct 25, 2023
LATEST

\d+ should find all numbers in a multi-digit number in one go.

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