PC Review


Reply
Thread Tools Rate Thread

How can I use ^#^#^#^#(space)^$ FIND and REPLACE with ^#^#^#^t^$ ?

 
 
Maurice
Guest
Posts: n/a
 
      9th Jan 2008
I am trying to reformat many huge documents and need to replace the "space"
that follows a four figure number with a tab mark without changing the four
figure number, or any subsequent space (none of which follow four figure
numbers until the next paragraph).

I cannot use the ^# symbol for "any digit" in the replace function.

How can I only change the one space for a tab in each paragraph? It is the
3rd space every time in pages of text like : "10 Nov 1788 JAMES Hemingway, of
Southo......"
 
Reply With Quote
 
 
 
 
Jay Freedman
Guest
Posts: n/a
 
      9th Jan 2008
In the Replace dialog, click the More button and check the box for "Use
wildcards".

In the Find What box, enter the expression

([0-9]{4})

and type a space character after the closing parenthesis.

In the Replace With box, enter the expression

\1^t

Click the Replace All button.

The search expression says "find any sequence of four characters in the
group from 0 through 9, followed by a space". The parentheses indicate that
the four digits form a group. The replacement expression says "replace the
found expression by the found group in parentheses, followed by a tab
character".

For more information on wildcard searches, see
http://www.gmayor.com/replace_using_wildcards.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Maurice wrote:
> I am trying to reformat many huge documents and need to replace the
> "space" that follows a four figure number with a tab mark without
> changing the four figure number, or any subsequent space (none of
> which follow four figure numbers until the next paragraph).
>
> I cannot use the ^# symbol for "any digit" in the replace function.
>
> How can I only change the one space for a tab in each paragraph? It
> is the 3rd space every time in pages of text like : "10 Nov 1788
> JAMES Hemingway, of Southo......"



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find and Replace - Replace with Blank Space =?Utf-8?B?U3R1ZGViYWtlcg==?= Microsoft Excel Misc 3 11th Oct 2007 11:39 PM
Find and replace a space with carriage return in excel =?Utf-8?B?TWlrZU1jQ29sbHVt?= Microsoft Excel Misc 2 29th Jun 2007 05:16 PM
Find and Replace - Period and space at end of sentence =?Utf-8?B?UmljaDU4?= Microsoft Word Document Management 4 20th Jun 2006 11:43 PM
find a space; replace w/no space? el zorro Microsoft Excel Misc 5 29th Sep 2004 03:42 AM
find and replace two spaces with one space =?Utf-8?B?am9zZXBoaW5lNjA1MUB5YWhvby5jb20=?= Microsoft Word Document Management 4 12th Aug 2004 10:01 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:49 PM.