Re: wildcard replacing

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: dk (dk_at_discussions.microsoft.com)
Date: 12/05/04


Date: Sun, 5 Dec 2004 09:39:07 -0800

also if we can make different for captilized letters also replacing a space
by counting the letters for example 122445 st shall be able to seperate with
a space with 2 letters prior to st

"Greg Maxey" wrote:

> dk,
>
> Part of the the problem is your line are separated by line breaks vice
> paragraphs. The search string I provided previously will not work with the
> line breaks. So first fine ^l and replace with ^13. You don't need wild
> cards for that search. Now excluding appartment numbers, which you didn't
> mention your first expample or telephone numbers for that matter, your first
> example should come out like this:
>
> Porges,Samiel,1223 46th St.,Brooklyn,NY,11219,718-436-8449
>
> Now there is the issue of the appartment number. You are going to need to
> make it (or at least the space between it and the street address, standout
> with higlight as well. In the example you provided the following would work
> as a separate search string.
>
> Using wildcards, find ( )[! ]yoursymbol That is (space)[!space]yoursymbol
> The string is looking for a space, then anything but a space, then your
> symbol. You will need to copy your symbol from the document and paste it
> using CTRL+v into the find what field.
>
>
> --
> Greg Maxey/Word MVP
> A Peer in Peer to Peer Support
>
> dk wrote:
> > we want no coma before 46th and before St. and 47th St. D.1 because
> > we want
> > to make a table so have all feilds seperate columns
> > Porges Samiel 1223 46th St. Brooklyn NY 11219 718-436-8449
> > Porges S. 1358 47th St. D.1 Brooklyn NY 11219 718.851-2791
> >
> >
> >
> > "dk" wrote:
> >
> >> please see this sample we tried the first step but it didn't work
> >> Porges Samiel 1223 46th St. Brooklyn NY 11219 718-436-8449
> >> Porges S. 1358 47th St. D.1 Brooklyn NY 11219 718.851-2791
> >>
> >>
> >> "Greg" wrote:
> >>
> >>> dk,
> >>>
> >>> I don't know how or if this could be done in a single pass and a
> >>> better way may come along. Your example is not the best. I am
> >>> assuming that you have mulitple lines something like this
> >>>
> >>> Mr Joe Jones 123 Miller St Boston MA 12345
> >>> Mrs Ann Smith 345 Park Ave Boston MA 12345
> >>> etc.
> >>>
> >>> This could be done in multiple passes.
> >>>
> >>> First make the street address stand out from the rest of the text.
> >>> Highlighting is one way to do this.
> >>>
> >>> Using wildcards find: [0-9]*Ave
> >>> Replace with ^& - Now with the cursor still in the replace
> >>> field, click format highlight.
> >>>
> >>> Relace all
> >>>
> >>> You will have to repeat a similar process for St, Blvd, Lane,
> >>> Place, Court, etc. If you use Ave. Rd. St. Blvd. Ct. etc, the you
> >>> could just use [0-9]*.
> >>>
> >>> OK, next we want to replace spaces that are not highlighted with
> >>> commas.
> >>> You don't need wildcards for this bit. With the cursor in the find
> >>> field type a single space, click Format>Highlight and Format
> >>> Highlight. You should see "Not Highlight" displayed under the
> >>> field field. In the Replace field type a comma and use
> >>> Format>Highlight to clear the Hightlight formatting from under the
> >>> replace with window. Click replace all.
> >>>
> >>> Next you want to remove hightlighing. Click in the find fiedl and
> >>> remove the space. Click Format>Hightlight to display Highlighted
> >>> under the find field. Click in the replace window and clear all
> >>> content. Click Format>Highlight to display Not highligthed below
> >>> the replace with field. Click replace all.
> >>>
> >>> HTH.
> >>>
> >>> "dk" wrote:
> >>>
> >>>> We have a document that we want to replace all spaces to
> >>>> commas,but 1 exception that the space which is before the word Ave
> >>>> or St and also the 1 word prior to those words shall also not be
> >>>> replaced ex: mr,John,Doe,123 45 St,Boston,MA,10234
> >>>> how can we do that using wildcards etc.?
>
>
>



Relevant Pages

  • Re: wildcard replacing
    ... A Peer in Peer to Peer Support ... > space by counting the letters for example 122445 st shall be able to ... which you didn't mention your first expample or telephone ... >> provided the following would work as a separate search string. ...
    (microsoft.public.word.pagelayout)
  • Re: wildcard replacing
    ... A Peer in Peer to Peer Support ... >> Greg Maxey/Word MVP ... >>> also if we can make different for captilized letters also replacing ... provided the following would work as a separate search string. ...
    (microsoft.public.word.pagelayout)
  • Re: Saving mail merged letter seperately then emailing
    ... Doug Robbins - Word MVP ... ' SubSplitter Macro ... While Counter < Letters ... seperate them to different pages within one document. ...
    (microsoft.public.word.mailmerge.fields)
  • Saving mail merged letter seperately then emailing
    ... Doug Robbins - Word MVP ... ' SubSplitter Macro ... While Counter < Letters ... seperate them to different pages within one document. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: If statement using switches in Mergefields
    ... A peer in "peer to peer" support ... I have found using the Help file how to add a> switch that will convert the first letter of each word to> capitals but changes all the other letters to lowercase. ...
    (microsoft.public.word.mailmerge.fields)