Solved

Regular Expression for entire line in a text file

Posted on 2010-09-08
2
333 Views
Last Modified: 2013-11-10
I have a text that I want to read on a daily basis and see if the file contains a certain pattern in a line.
The Line is:
09/06/2010 07:45 AM - Field Import Job: Correspondence Litigation Chargeback (OK) - Finished in 00:00.06
I am able to get the pattern for the date.
 Dim pattern As String = "\b" & (Format(DateValue(Now).AddDays(-1), "MM/dd/yyyy")) 

Open in new window

I want to also look for the (OK)
0
Comment
Question by:yo_bee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 500 total points
ID: 33627431
Try this:


Dim pattern As String = "\b" & (Format(DateValue(Now).AddDays(-1), "MM/dd/yyyy")) & "\b.*\(OK\)"

Open in new window

0
 
LVL 23

Author Closing Comment

by:yo_bee
ID: 33627524
That was the fastest turnaround
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

This is about my first experience with programming Arduino.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

623 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