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?
Copy link to clipboard
Copied
Find numbers and replace with nothing... No whitespace will be created and your text will move left.
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. 🙂
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?
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.
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.
Copy link to clipboard
Copied
\d+ should find all numbers in a multi-digit number in one go.