Re: Find & Replace Question
From: Mary (anonymous_at_discussions.microsoft.com)
Date: 05/06/04
- Next message: Graham Mayor: "Re: Find & Replace Question"
- Previous message: Suzy: "CSV & other file formats not supported in Visio 2003"
- In reply to: Graham Mayor: "Re: Find & Replace Question"
- Next in thread: Graham Mayor: "Re: Find & Replace Question"
- Reply: Graham Mayor: "Re: Find & Replace Question"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 6 May 2004 08:34:40 -0700
Your statement "That extra character remains part of the
search string, but you want to keep that character, so
you mark it with round brackets to enable you to put back
the extra leading character in your replacement" was what
I needed to hear and it hit the spot. I'm gonna make you
proud yet!
Thanks so very much, Graham.
Your grateful Ft. Lauderdale fan,
Mary
>-----Original Message-----
>The principle of searching is to look for a unique
string.
>Here you are looking for two spaces but not if those two
spaces follow a
>full stop (period)
>Essentially the [!.] means look for any character except
a full stop
>(period). i.e. the exclamation mark means ignore this
(or these)
>character(s) in this bracketed section. Thus you can
exclude characters from
>the search string.
>That extra character remains part of the search string,
but you want to keep
>that character, so you mark it with round brackets
>to enable you to put back the extra leading character in
your replacement
>string using the \1 , which means replace the first set
of bracketed
>characters.
>
>--
><>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
> Graham Mayor - Word MVP
>
> Web site www.gmayor.com
> Word MVP web site www.mvps.org/word
><>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
>
>
>
>Mary wrote:
>> Graham, thanks more than I can say for your additional
>> input. I feel so stupid each time I let the
exclamation
>> point in a string throw me, but it never fails to do
so.
>>
>> I'm still not the sharpest tool in the shed when it
comes
>> to find and replace, but I'm a million times better
since
>> reading the wonderful article by you and Jay. I'll
keep
>> trying to better understand the ! .
>>
>> Thanks again!
>>
>>
>>> -----Original Message-----
>>> Jay Freedman wrote:
>>>> I assume that when you find two spaces between
words, you then want
>>>> to replace them with a single space. To do that,
modify the Find
>>>> What expression to
>>>>
>>>> ([!.])<space><space>
>>>>
>>>> and use the Replace With expression
>>>>
>>>> \1<space>
>>>>
>>>> The \1 part will be filled in with whatever
character matched the
>>>> [!1], and the two spaces will be replaced with one
space.
>>>
>>> Or ..... you could move the bracket
>>> ([!.]<space>)<space>
>>> and replace with
>>> \1
>>>
>>> Or...... if you may have more than two spaces
>>> you could search for
>>> ([!.]<space>)<space>{1,}
>>>
>>> Personally I like to square bracket spaces so they
are not missed -
>>> but the square brackets are not necessary to make the
search string
>>> work.
>>>
>>> ([!.][ ])[ ]{1,}
>>> and replace with
>>> \1
>>>
>>> --
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
>>> Graham Mayor - Word MVP
>>>
>>> Web site www.gmayor.com
>>> Word MVP web site www.mvps.org/word
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
>>>
>>>
>>>
>>> .
>
>
>.
>
- Next message: Graham Mayor: "Re: Find & Replace Question"
- Previous message: Suzy: "CSV & other file formats not supported in Visio 2003"
- In reply to: Graham Mayor: "Re: Find & Replace Question"
- Next in thread: Graham Mayor: "Re: Find & Replace Question"
- Reply: Graham Mayor: "Re: Find & Replace Question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|