I am working on some tests and evaluations where the author did not
use numerals and tabs correctly.
I want to be able to use a wildcard search to find, for example "1.
^t^t" and replace it with "^t1.^t" and the "1" would whatever number
from 0-9. In other words, I want to search once, then do a replace
that will fix the formatting of the tabs and keep the numbers the
same.
Can this be done?
|
|
0
|
|
|
|
Reply
|
Fogharty
|
11/23/2009 11:13:09 PM |
|
Yes, it can be done.
Now, let's see if I can remember how... :-)
Ah hah! I knew I had this somewhere...
Find What is:
([0-9].)(^t^t)
Replace with is:
^t\1^t
And "Use Wildcards" must be turned on.
What this does is divide the find into two regular expressions, using ( and
).
The first expression finds any SINGLE digit 0 to 9 followed by a period.
The second expression finds the two consecutive tabs.
Then in the Replace, we add a tab, whatever the first Find expression found,
and another tab. We discard the result of the second find expression (the
two tabs).
If your number series exceeds one digit, you need to double the [0-9] in the
first expression and run that first to do all the two-digit numbers, then
remove that and run again to do the single digit numbers. If you try to do
the singles first and then the doubles, you'll break it :-)
Hope this helps
On 24/11/09 10:13 AM, in article
2880b44e-660b-480e-9f84-ed8006ce7d61@p32g2000vbi.googlegroups.com,
"Fogharty" <fogharty@lycos.com> wrote:
> I am working on some tests and evaluations where the author did not
> use numerals and tabs correctly.
>
> I want to be able to use a wildcard search to find, for example "1.
> ^t^t" and replace it with "^t1.^t" and the "1" would whatever number
> from 0-9. In other words, I want to search once, then do a replace
> that will fix the formatting of the tabs and keep the numbers the
> same.
>
> Can this be done?
--
Mactopia is currently broken: the helpers are not seeing any of the
questions being posted. Microsoft is working on the problem. In the
meantime:
To successfully post in here, either use Google:
http://groups.google.com/group/microsoft.public.mac.office.word?lnk=
Or Microsoft Communities:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=micros
oft.public.mac.office.word&cat=en_US_3cf8ecf1-ca81-4391-b07d-8933029ee8a9&la
ng=en&cr=US
Or in Entourage, use the pre-configured Microsoft News server:
See "setting up Entourage for Newsreading" here:
http://word.mvps.org/Mac/AccessNewsgroups.html
This email is my business email -- Please do not email me about forum
matters unless you intend to pay!
John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:john@mcghie.name
|
|
0
|
|
|
|
Reply
|
John
|
11/24/2009 1:30:39 AM
|
|
What would I do without you John!
A couple of things I've discovered:
I can't just copy and paste the search terms from my browser to my
Find dialog in Word... it only works if I type it in by hand.
I had to tweak the Replace
^t\1^t
With
^t\1.^t
to keep the decimal point there.
But otherwise... goodness! This will save me a load of time.
Now if I can get my other problem fixed, I'll be good to go!
Thanks!
On Nov 23, 7:30=A0pm, John McGhie <j...@mcghie.name> wrote:
> Yes, it can be done.
>
> Now, let's see if I can remember how... :-)
>
> Ah hah! =A0I knew I had this somewhere...
>
> Find What is:
>
> ([0-9].)(^t^t)
>
> Replace with is:
>
> ^t\1^t
>
> And "Use Wildcards" must be turned on.
>
> What this does is divide the find into two regular expressions, using ( a=
nd
> ).
>
> The first expression finds any SINGLE digit 0 to 9 followed by a period.
> The second expression finds the two consecutive tabs.
>
> Then in the Replace, we add a tab, whatever the first Find expression fou=
nd,
> and another tab. =A0We discard the result of the second find expression (=
the
> two tabs).
>
> If your number series exceeds one digit, you need to double the [0-9] in =
the
> first expression and run that first to do all the two-digit numbers, then
> remove that and run again to do the single digit numbers. =A0If you try t=
o do
> the singles first and then the doubles, you'll break it :-)
>
> Hope this helps
>
|
|
0
|
|
|
|
Reply
|
Fogharty
|
11/24/2009 5:13:00 PM
|
|
The Replace should not have needed tweaking :-)
The "\1" replaces "Whatever was found". So check your "Find What" to ensure
that you have included the decimal point inside the parentheses, so that it
becomes one of the "found" characters.
Otherwise, this thing will fire on "any digit" and you don't want that :-)
Cheers
On 25/11/09 4:13 AM, in article
04462cd4-95a0-4aa3-a55f-5ca87452d8e5@u20g2000vbq.googlegroups.com,
"Fogharty" <fogharty@lycos.com> wrote:
> What would I do without you John!
>
> A couple of things I've discovered:
>
> I can't just copy and paste the search terms from my browser to my
> Find dialog in Word... it only works if I type it in by hand.
>
> I had to tweak the Replace
> ^t\1^t
> With
> ^t\1.^t
> to keep the decimal point there.
>
> But otherwise... goodness! This will save me a load of time.
>
> Now if I can get my other problem fixed, I'll be good to go!
>
> Thanks!
>
> On Nov 23, 7:30�pm, John McGhie <j...@mcghie.name> wrote:
>> Yes, it can be done.
>>
>> Now, let's see if I can remember how... :-)
>>
>> Ah hah! �I knew I had this somewhere...
>>
>> Find What is:
>>
>> ([0-9].)(^t^t)
>>
>> Replace with is:
>>
>> ^t\1^t
>>
>> And "Use Wildcards" must be turned on.
>>
>> What this does is divide the find into two regular expressions, using ( and
>> ).
>>
>> The first expression finds any SINGLE digit 0 to 9 followed by a period.
>> The second expression finds the two consecutive tabs.
>>
>> Then in the Replace, we add a tab, whatever the first Find expression found,
>> and another tab. �We discard the result of the second find expression (the
>> two tabs).
>>
>> If your number series exceeds one digit, you need to double the [0-9] in the
>> first expression and run that first to do all the two-digit numbers, then
>> remove that and run again to do the single digit numbers. �If you try to do
>> the singles first and then the doubles, you'll break it :-)
>>
>> Hope this helps
>>
--
Mactopia is currently broken: the helpers are not seeing any of the
questions being posted. Microsoft is working on the problem. In the
meantime:
To successfully post in here, either use Google:
http://groups.google.com/group/microsoft.public.mac.office.word?lnk=
Or Microsoft Communities:
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=micros
oft.public.mac.office.word&cat=en_US_3cf8ecf1-ca81-4391-b07d-8933029ee8a9&la
ng=en&cr=US
Or in Entourage, use the pre-configured Microsoft News server:
See "setting up Entourage for Newsreading" here:
http://word.mvps.org/Mac/AccessNewsgroups.html
This email is my business email -- Please do not email me about forum
matters unless you intend to pay!
John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:john@mcghie.name
|
|
0
|
|
|
|
Reply
|
John
|
11/25/2009 12:10:50 AM
|
|
On Nov 25, 12:10=A0am, John McGhie <j...@mcghie.name> wrote:
> The Replace should not have needed tweaking :-)
>
> The "\1" replaces "Whatever was found". =A0So check your "Find What" to e=
nsure
> that you have included the decimal point inside the parentheses, so that =
it
> becomes one of the "found" characters.
>
> Otherwise, this thing will fire on "any digit" and you don't want that :-=
)
>
> Cheers
>
> On 25/11/09 4:13 AM, in article
> 04462cd4-95a0-4aa3-a55f-5ca87452d...@u20g2000vbq.googlegroups.com,
>
>
>
> "Fogharty" <fogha...@lycos.com> wrote:
> > What would I do without you John!
>
> > A couple of things I've discovered:
>
> > I can't just copy and paste the search terms from my browser to my
> > Find dialog in Word... it only works if I type it in by hand.
>
> > I had to tweak the Replace
> > =A0^t\1^t
> > With
> > ^t\1.^t
> > to keep the decimal point there.
>
> > But otherwise... goodness! This will save me =A0a load of time.
>
> > Now if I can get my other problem fixed, I'll be good to go!
>
> > Thanks!
>
> > On Nov 23, 7:30=A0pm, John McGhie <j...@mcghie.name> wrote:
> >> Yes, it can be done.
>
> >> Now, let's see if I can remember how... :-)
>
> >> Ah hah! =A0I knew I had this somewhere...
>
> >> Find What is:
>
> >> ([0-9].)(^t^t)
>
> >> Replace with is:
>
> >> ^t\1^t
>
> >> And "Use Wildcards" must be turned on.
>
> >> What this does is divide the find into two regular expressions, using =
( and
> >> ).
>
> >> The first expression finds any SINGLE digit 0 to 9 followed by a perio=
d.
> >> The second expression finds the two consecutive tabs.
>
> >> Then in the Replace, we add a tab, whatever the first Find expression =
found,
> >> and another tab. =A0We discard the result of the second find expressio=
n (the
> >> two tabs).
>
> >> If your number series exceeds one digit, you need to double the [0-9] =
in the
> >> first expression and run that first to do all the two-digit numbers, t=
hen
> >> remove that and run again to do the single digit numbers. =A0If you tr=
y to do
> >> the singles first and then the doubles, you'll break it :-)
>
> >> Hope this helps
>
> =A0--
>
> Mactopia is currently broken: the helpers are not seeing any of the
> questions being posted. =A0Microsoft is working on the problem. =A0In the
> meantime:
>
> To successfully post in here, either use Google:http://groups.google.com/=
group/microsoft.public.mac.office.word?lnk=3D
>
> Or Microsoft Communities:http://www.microsoft.com/communities/newsgroups/=
en-us/default.aspx?dg...
> oft.public.mac.office.word&cat=3Den_US_3cf8ecf1-ca81-4391-b07d-8933029ee8=
a9&la
> ng=3Den&cr=3DUS
>
> Or in Entourage, use the pre-configured Microsoft News server:
> See "setting up Entourage for Newsreading" here:http://word.mvps.org/Mac/=
AccessNewsgroups.html
>
> This email is my business email -- Please do not email me about forum
> matters unless you intend to pay!
>
> John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
> McGhie Information Engineering Pty Ltd
> Sydney, Australia. | Ph: +61 (0)4 1209 1410
> +61 4 1209 1410, mailto:j...@mcghie.name
Pasting into the Find-and-replace dialog:
I often have problems with this. I not infrequently get blocks of text
from web-pages etc, which comes in with inappropriate line-endings of
some sort which need removing.
If I paste that text into Word 5, I can select whatever is at the end
of the line, and paste it into the Replace box. Word 2008 won't let me
paste anything in. I sometimes can't tell what the particular line-
ending character actually IS, so I don't know what to actually type
into the dialog...
Any suggestions? (other than sticking to Word 5, which is what I would
like to do!)
|
|
0
|
|
|
|
Reply
|
dow
|
11/25/2009 8:59:15 AM
|
|
Hi Dow:
I cannot understand what you mean?
Pasting into Word 2008's Find box works fine for me. Wild cards are ASCII
symbols, so you can paste them readily. You can't paste line-enders because
they are significant characters in the search: you have to use either ^l, ^m
or ^p, depending on which one you want.
Cheers
On 25/11/09 7:59 PM, in article
6904e53b-bf08-4ffe-a4d6-51e334c99b1d@j14g2000yqm.googlegroups.com, "dow"
<dow.smith@gmail.com> wrote:
> Pasting into the Find-and-replace dialog:
>
> I often have problems with this. I not infrequently get blocks of text
> from web-pages etc, which comes in with inappropriate line-endings of
> some sort which need removing.
>
> If I paste that text into Word 5, I can select whatever is at the end
> of the line, and paste it into the Replace box. Word 2008 won't let me
> paste anything in. I sometimes can't tell what the particular line-
> ending character actually IS, so I don't know what to actually type
> into the dialog...
>
> Any suggestions? (other than sticking to Word 5, which is what I would
> like to do!)
--
The email below is my business email -- Please do not email me about forum
matters unless I ask you to; or unless you intend to pay!
John McGhie, Microsoft MVP (Word, Mac Word), Consultant Technical Writer,
McGhie Information Engineering Pty Ltd
Sydney, Australia. | Ph: +61 (0)4 1209 1410
+61 4 1209 1410, mailto:john@mcghie.name
|
|
0
|
|
|
|
Reply
|
John
|
11/26/2009 5:23:42 AM
|
|
|
5 Replies
162 Views
(page loaded in 0.171 seconds)
Similiar Articles: Help!!! Using WildCards for Find and Replace - microsoft.public ...Felgall Wordprocessing - Using Wildcards with Find and Replace in Word Computer Help Blog. Using Wildcards with Find and Replace in Word. The find and replace options in ... Wild characters in Find and Replace - microsoft.public.word ...Wild characters in Find and Replace - microsoft.public.word ... Wild characters in Find and Replace - microsoft.public.word ... Help!!! Using WildCards for Find and ... Help with wildcard Replace syntax, please? - microsoft.public.word ...Microsoft Word Help ... I tried a wildcard Find/Replace: -- Find: 5 spaces, any combination of 2 numbers, a ... You must enter into the Replace box exactly what it is ... Wildcard in the Replace function - microsoft.public.excel.misc ...This is a general question on the replace function. In the Find/Replace dialog box, you can use wildcards to find text/formulas. There is not the ... Replace using wildcards - microsoft.public.accessWildcards in Find and Replace - Free Microsoft Word Tutorials ... If you're looking for a little more flexibility when you're searching for text within your document, the ... Find and Replace Macro - microsoft.public.word.vba.general ...Using WildCards for Find and Replace - microsoft.public ... I need to manually search and replace each instance. Please help in creating a macro using WildCard search or ... Unicode text Find & Replace - microsoft.public.word.vba ...Using WildCards for Find and Replace - microsoft.public ... Using WildCards for Find and Replace - microsoft.public ... Unicode text Find & Replace - microsoft.public.word ... Word find/replace equivalent of (word1but had no luck My question is, is there/what is the Microsoft Word find/replace ... After you do a wildcard search, I recommend that you clear the "Use wildcards ... Wildcard search in VBA? - microsoft.public.access.formscoding ...Help with wildcard Replace syntax, please? - microsoft.public.word ... Excel - Find And Replace Vba Wildcards - - Free Excel Help Find And Replace Vba Wildcards - - Free ... Find and Replace any digit - microsoft.public.word.docmanagement ...... working in Word 2007. I am trying for a different find and replace ... 1st March 2004 ... Find and replace text or other items - Word - Office.com Wildcards for items you ... Using wildcards when you find and replace in Word | TechRepublicThere's one thing users don't realize about Word's Find and Replace feature—you can use wildcards to "find" strings that are similar bu How to Find and Replace Wildcards in MS Word | eHow.comThe asterisk (*) and the question mark (?) are commonly used wildcards, according to Indiana University. You may have used these wildcards as placeholders or ... Replace using wildcards - Graham Mayor - Home Page(Unfortunately, there is no wildcard to search for "zero or more occurrences" in Word wildcard ... 2 \1 - note the spaces in the search and replace strings ... Finding and replacing characters using wildcardsBut the wildcard feature in Word goes way beyond that, and can be very powerful. To begin, you must first turn Wildcards onin the Find/Replace dialog. 7/21/2012 1:43:37 AM
|