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

Find and delete all numbers in a document

Explorer ,
Oct 25, 2023 Oct 25, 2023

Copy link to clipboard

Copied

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

Views

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

Copy link to clipboard

Copied

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

Votes

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

Copy link to clipboard

Copied

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. 🙂

Votes

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

Copy link to clipboard

Copied

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?

 

Votes

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

Copy link to clipboard

Copied

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.

Votes

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

Copy link to clipboard

Copied

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.

Votes

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

Copy link to clipboard

Copied

LATEST

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

Votes

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