Removing multiple dates?

Hello all,

Not sure if this is the right place to ask.

I’m working on something for my company. I need to upload some records to an internal website. All of the information was sent to me as a text file. I guess the just kept the records of everything by just appending everything to one document.

Now there’s some information in here that I don’t need. Specifically, the dates. I’ve toyed with PHP before and I could swear there’s a way to have a script open this file, find the dates and replace them with nothing, and then save the file again. I really don’t want to do this manually as there are hundreds (possibly thousands) of dates noted here.

So, is there a script that could search for a mm/dd/yyyy format in this text document and wipe them out?

You’re probably going to need a regex for that, and those aren’t easy. You might want to look up preg_replace() and fopen().

Sponsor our Newsletter | Privacy Policy | Terms of Service