Hi,

My experience in Regex coding is very less. I have been assigned to clean up some data to make it meaningful. I got this data from SQL server:

10/8/2007 5:03:06 PM thakurab *************RECIVED MAIL PQR Start Time: 10/08/07 16:29:09 New PQR State: Assigned Respond Due Date: 10/09/07 00:29:09

The pattern in this case is pretty simple. After date/time is the name and the code has to split and divide this data in a new line. Thus my renewed data will be:

10/8/2007 5:03:06 PM thakurab
*************RECIVED MAIL
PQR Start Time: 10/08/07 16:29:09
New PQR State: Assigned
Respond Due Date: 10/09/07 00:29:09


How do I achieve this with Regexpression.?

Any help towards this will be of great help to me.

Thanks,

Prasanna.

Try this: string[] lines = Regex.Split(s, "(.+?)(\\*{0,13}RECIVED MAIL)\\s*(PQR.+)(New PQR.+)(Respond.+)");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.