Doing the match in C# from VB code

With ref to Egyptian's code

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=570980&SiteID=1

to find paras in a string and split each para and populate datagridview1 col1, row1 with para1... col1, row2 with para2 etc...

I am unable to translate this to c# and request help esp with the regex. Here is the vb.net code again...

Dim delma As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(""& vbLf& vbLf)
Dim singleLines() As String = delma.Split(MyOrigionalTable.rows[index])

datagridview1. datasource = singleLines()

Thanks !

(Moderator: Thread moved to the Regular Expression Forum and Title tweaked for quicker thread understanding during a search)
[1352 byte] By [Ultrawhack] at [2008-2-10]
# 1

I didn't get into the linked article, but the code you posted should be the following in C#:

using System.Text.RegularExpressions
...

RegEx delma = new RegEx("\n\n");
string singleLines() = delma.Split(MyOriginalTable.rows[index]);

datagridview1.DataSource = singleLines();

RobTeixeira at 2007-8-30 > top of Msdn Tech,.NET Development,Regular Expressions...

.NET Development

Site Classified