Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 263
  • Last Modified:

Find / Replace Dates

I am writing a program that opens and reads all the files in a directory one at a time and if any occurences of the following are found, then the month is incremented by +1. also, if the current year is other than 2008, replace with current year.
'20080301'
'2008-08-18
'200808%'
'2008-08-01'
'200808
I've tried the System.Text.RegularExpressions and the replace() methods, but wanted to know if someone had a better approach.

Thanks in advance
pandkyon
0
pandkyon
Asked:
pandkyon
1 Solution
 
CodeCruiserCommented:
I think you are already using a good method. The regular expression is the answer to matching multiple words to a pattern. And the replace function would obviously do the actual replacing of the word for you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now