Advertisement

06.26.2008 at 11:44AM PDT, ID: 23519375
[x]
Attachment Details

File parsing with Regular Expression

Asked by gdupadhyay in Regular Expressions, Microsoft Visual C#.Net, Visual Studio .NET 2005

Tags: C#, Visual Studio, 2005, C#

Hi,
I am using Visual Studio 2005 and language C#
I want to parse a file to extract some data  using Regular Expression.
I used              using System.Text.RegularExpressions;
Please help me  to parse a attached file using regular expression which is based on some pattern
I want exactly cert,Name and company based on pattern for regular expression.

Currently i am using
String pattern = "cert:(?<CertNo>.{9})\\s\\S* full name is\\s+(?<Name>.{12})\\s+company=(?<Company>.{11})";
as a pattern, But its parse only first line not 2nd line, because the contents on 2nd line is differ and not matched with the pattern. Please help me to write exact pattern to parse both line.


Let me know if you have any question.

Thanks in Advance
Ganesh Dutt UpadhyayStart Free Trial
Attachments:
 
File to be parsed
 
 
Keywords: File parsing with Regular Expression
 
Loading Advertisement...
 
[+][-]06.26.2008 at 11:49AM PDT, ID: 21877842

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 12:37PM PDT, ID: 21878233

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 12:54PM PDT, ID: 21878397

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 01:26PM PDT, ID: 21878680

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 01:46PM PDT, ID: 21878851

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Regular Expressions, Microsoft Visual C#.Net, Visual Studio .NET 2005
Tags: C#, Visual Studio, 2005, C#
Sign Up Now!
Solution Provided By: ddrudik
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.26.2008 at 02:08PM PDT, ID: 21879041

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 02:09PM PDT, ID: 21879055

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 02:10PM PDT, ID: 21879057

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628