Solved

Find / Replace Dates

Posted on 2008-10-14
1
217 Views
Last Modified: 2012-05-05
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
Comment
Question by:pandkyon
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 300 total points
ID: 22718880
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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
A short film showing how OnPage and Connectwise integration works.

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now