Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.newusers
dk dk is offline
external usenet poster
 
Posts: 32
Default Removing with wildcard

How can we remove numbers in begining of line all numbers with also date
format removed ?
ex:12/24/2002 10:34 AM 35,607 57084Eudora.zip
we want only strating from Eudora kept
  #2   Report Post  
Posted to microsoft.public.word.newusers
Jean-Guy Marcil[_2_] Jean-Guy Marcil[_2_] is offline
external usenet poster
 
Posts: 373
Default Removing with wildcard

"dk" wrote:

How can we remove numbers in begining of line all numbers with also date
format removed ?
ex:12/24/2002 10:34 AM 35,607 57084Eudora.zip
we want only strating from Eudora kept


If your sample text is truely representative of the text you have in your
document, use the following in the "Find what" box of the Replace dialog:

*M([0-9, ,\,]@)([!0-9]@^13)

Then use this in the "Replace with" box:

\2

Click on "More" and check the "Use wildcards" checkbox.
Then try "Replace All".

If it does not do what you want, undo rigth away. You may need to tinker
with the "Find what" expression.
  #3   Report Post  
Posted to microsoft.public.word.newusers
Klaus Linke Klaus Linke is offline
external usenet poster
 
Posts: 413
Default Removing with wildcard

One problem might be that file names can start with numbers, too.

If the text file uses tabs, it might be best to delete everything up to the
4th (or whatever) tab.
Or if the text file uses blanks, delete the appropriate number of characters
from the start.

Regards,
Klaus


"Jean-Guy Marcil" wrote:
"dk" wrote:

How can we remove numbers in begining of line all numbers with also date
format removed ?
ex:12/24/2002 10:34 AM 35,607 57084Eudora.zip
we want only strating from Eudora kept


If your sample text is truely representative of the text you have in your
document, use the following in the "Find what" box of the Replace dialog:

*M([0-9, ,\,]@)([!0-9]@^13)

Then use this in the "Replace with" box:

\2

Click on "More" and check the "Use wildcards" checkbox.
Then try "Replace All".

If it does not do what you want, undo rigth away. You may need to tinker
with the "Find what" expression.


  #4   Report Post  
Posted to microsoft.public.word.newusers
dk dk is offline
external usenet poster
 
Posts: 32
Default Removing with wildcard

doesn't seem to work we are sending again example
05/14/2002 02:55 , 3,159,017 1.2.0.1620_enu_tr.zip
07/05/2001 08:07 , 2,403,276 1240WC.EXE
07/04/2001 12:03 AM 4,416,001 34CN115.EXE
03/22/2001 03:18 , 1,506,387 4130xdat.exe
12/24/2002 10:34 AM 35,607 57084Eudora.zip
07/05/2001 03:00 , 1,159,429 730WWDME.EXE
01/07/2003 12:15 AM 14,710,662 A5V451.exe
01/07/2003 12:56 AM 15,498,203 A5V5.exe
10/01/2002 10:20 AM 205,548 AAD414.48(alpha5).zip
06/06/2002 10:30 , 84,978 AddUtil.zip
04/22/2001 02:30 , 8,820,072 ar500enu.exe
02/09/2003 12:05 , 366 aspi32.exe.lnk

we want to remove up to last word on each line

"Jean-Guy Marcil" wrote:

"dk" wrote:

How can we remove numbers in begining of line all numbers with also date
format removed ?
ex:12/24/2002 10:34 AM 35,607 57084Eudora.zip
we want only strating from Eudora kept


If your sample text is truely representative of the text you have in your
document, use the following in the "Find what" box of the Replace dialog:

*M([0-9, ,\,]@)([!0-9]@^13)

Then use this in the "Replace with" box:

\2

Click on "More" and check the "Use wildcards" checkbox.
Then try "Replace All".

If it does not do what you want, undo rigth away. You may need to tinker
with the "Find what" expression.

  #5   Report Post  
Posted to microsoft.public.word.newusers
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Removing with wildcard

Assuming each line ends with a paragraph mark
Replace
[0-9]{2}/[0-9]{2}/[0-9]{4}*[0-9,]{4,}[ ](*)^13
with
\1^p
with the wildcard option set

http://www.gmayor.com/replace_using_wildcards.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



dk wrote:
doesn't seem to work we are sending again example
05/14/2002 02:55 , 3,159,017 1.2.0.1620_enu_tr.zip
07/05/2001 08:07 , 2,403,276 1240WC.EXE
07/04/2001 12:03 AM 4,416,001 34CN115.EXE
03/22/2001 03:18 , 1,506,387 4130xdat.exe
12/24/2002 10:34 AM 35,607 57084Eudora.zip
07/05/2001 03:00 , 1,159,429 730WWDME.EXE
01/07/2003 12:15 AM 14,710,662 A5V451.exe
01/07/2003 12:56 AM 15,498,203 A5V5.exe
10/01/2002 10:20 AM 205,548 AAD414.48(alpha5).zip
06/06/2002 10:30 , 84,978 AddUtil.zip
04/22/2001 02:30 , 8,820,072 ar500enu.exe
02/09/2003 12:05 , 366 aspi32.exe.lnk

we want to remove up to last word on each line

"Jean-Guy Marcil" wrote:

"dk" wrote:

How can we remove numbers in begining of line all numbers with
also date format removed ?
ex:12/24/2002 10:34 AM 35,607 57084Eudora.zip
we want only strating from Eudora kept


If your sample text is truely representative of the text you have in
your document, use the following in the "Find what" box of the
Replace dialog:

*M([0-9, ,\,]@)([!0-9]@^13)

Then use this in the "Replace with" box:

\2

Click on "More" and check the "Use wildcards" checkbox.
Then try "Replace All".

If it does not do what you want, undo rigth away. You may need to
tinker with the "Find what" expression.





  #6   Report Post  
Posted to microsoft.public.word.newusers
Klaus Linke Klaus Linke is offline
external usenet poster
 
Posts: 413
Default Removing with wildcard

Or, taking it from the other end,

Find what: *[^32^9]([!^32^9]@^13)
Replace with: \1

I wouldn't count on the filename being a single word (that is, contains no
spaces) in a serious application though.

If the text export came from a DIR output and the columns were originally
aligned, the method I suggested earlier should be safer.

Regards,
Klaus


"Graham Mayor" wrote:
Assuming each line ends with a paragraph mark
Replace
[0-9]{2}/[0-9]{2}/[0-9]{4}*[0-9,]{4,}[ ](*)^13
with
\1^p
with the wildcard option set

http://www.gmayor.com/replace_using_wildcards.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
wildcard(\nt\%( ,\nt\% )) Narendra Boga Microsoft Word Help 2 October 12th 07 01:36 PM
Wildcard issue Steved Microsoft Word Help 2 September 2nd 07 02:36 AM
Help with wildcard search, please? Ed New Users 8 July 28th 06 11:18 AM
Wildcard expression? RedRado03 Microsoft Word Help 1 July 5th 06 05:46 PM
Using a Wildcard Steved Microsoft Word Help 4 May 30th 05 08:33 PM


All times are GMT +1. The time now is 06:23 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"