Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: Galisteo8Posted on 2006-05-15 at 20:57:01ID: 16687517
Hi, jc31415,
Leading blanks are distinguishable from regular blanks by the fact that they are immeidately preceded by a paragraph mark or a line break. In the Find and Replace dialog box, these are typed as ^p and ^l, respectively.
So, if there are a set number of leading blanks (say, 8) and your lines are separated by paragraph marks, then go to Edit > Replace (or press Ctrl+H) to open the Find and Replace dialog box. In the 'Find What' field, type ^p followed by 8 spaces, and in the 'Replace With' field, type ^p^t^t^t^t . (^t is how you represent a tab character in the field). Click the Replace All button.
However, if the leading spaces vary in number on each line, you can do the following:
1)
Find What: ^p followed by 2 spaces
Replace With: ^p^t
Click the Replace All button.
2)
Find What: ^t followed by 2 spaces
Replace With: ^t^t
Click the Replace All button.
Repeat step 2 until Word indicates no more instances are being found.
hth,
Galisteo8