Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

seach & replace in Word 2000 1

Status
Not open for further replies.

emblem

Programmer
Jun 25, 2002
26
Hello experts,

I have a word document with lines of dates, plus other text. Most of the dates are
05/01/2006 i.e (<[0-9]{2}/[0-9]{2}/[0-9]{4}>) pattern

But some of the dates are 07/01/2004~08/01/2006, where the ~ is a literal
I even have some 06/01/2002~03/01/2006~09/01/2007 lines

I am trying to replace all of the latter two types with just the first date, to get
05/01/2006
07/01/2004
06/01/2002

But I am having trouble defining the ~ as a separator. Seems like (<~*[0-9]>) could define the extra dates (start with a ~, then anything, ending with four digits), but the Search field does not like this. If it did, I was hoping to replace the whole thing with \1

Any guidance much appreciated.
 
The tilde does not represent the start of a word, so "[blue][tt]<~[/tt][/blue]" will not find it. Try just "[blue][tt]~[/tt]etc.[/blue]"

Enjoy,
Tony

------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.

I'm working (slowly) on my own website
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top