Click here to Skip to main content
15,905,682 members
Home / Discussions / C#
   

C#

 
QuestionIs there a bug in the treeView.Nodes.Find method?? Pin
Rafone19-Dec-08 6:27
Rafone19-Dec-08 6:27 
AnswerRe: Is there a bug in the treeView.Nodes.Find method?? Pin
PIEBALDconsult19-Dec-08 7:15
mvePIEBALDconsult19-Dec-08 7:15 
GeneralRe: Is there a bug in the treeView.Nodes.Find method?? Pin
Rafone19-Dec-08 7:32
Rafone19-Dec-08 7:32 
QuestionDeploying an application written in C# 2005 Special Edition Pin
AngusOAP19-Dec-08 6:15
AngusOAP19-Dec-08 6:15 
QuestionHook Child events into Parent UserControl Pin
mmuttmax19-Dec-08 5:33
mmuttmax19-Dec-08 5:33 
Questionimport csv. Read not a problem, just cannot display the columns Pin
arenaldo19-Dec-08 4:51
arenaldo19-Dec-08 4:51 
AnswerRe: import csv. Read not a problem, just cannot display the columns Pin
Le centriste19-Dec-08 4:55
Le centriste19-Dec-08 4:55 
QuestionHow to invoke multiple webmethods at a once? Pin
venkat.st19-Dec-08 3:32
venkat.st19-Dec-08 3:32 
AnswerRe: How to invoke multiple webmethods at a once? Pin
Le centriste19-Dec-08 4:56
Le centriste19-Dec-08 4:56 
QuestionDirectory Services Pin
Jacob D Dixon19-Dec-08 3:30
Jacob D Dixon19-Dec-08 3:30 
QuestionFtp Transfer Server to Server Pin
New78019-Dec-08 3:12
New78019-Dec-08 3:12 
AnswerRe: Ftp Transfer Server to Server Pin
Rutvik Dave19-Dec-08 3:28
professionalRutvik Dave19-Dec-08 3:28 
GeneralRe: Ftp Transfer Server to Server Pin
New78019-Dec-08 4:21
New78019-Dec-08 4:21 
GeneralRe: Ftp Transfer Server to Server Pin
Rutvik Dave19-Dec-08 5:25
professionalRutvik Dave19-Dec-08 5:25 
GeneralRe: Ftp Transfer Server to Server Pin
New78025-Dec-08 23:17
New78025-Dec-08 23:17 
Questionhow to convert c++ to C# ? Pin
lockepeak19-Dec-08 2:39
lockepeak19-Dec-08 2:39 
AnswerRe: how to convert c++ to C# ? Pin
DaveyM6919-Dec-08 2:46
professionalDaveyM6919-Dec-08 2:46 
AnswerRe: how to convert c++ to C# ? Pin
Dave Doknjas19-Dec-08 12:44
Dave Doknjas19-Dec-08 12:44 
QuestionLoop through and process every php code. Pin
jafingi19-Dec-08 1:13
jafingi19-Dec-08 1:13 
AnswerRe: Loop through and process every php code. Pin
Jens Meyer19-Dec-08 1:35
Jens Meyer19-Dec-08 1:35 
GeneralRe: Loop through and process every php code. [modified] Pin
jafingi19-Dec-08 1:51
jafingi19-Dec-08 1:51 
GeneralRe: Loop through and process every php code. Pin
Gideon Engelberth19-Dec-08 3:18
Gideon Engelberth19-Dec-08 3:18 
The MSDN website has a good explanation of the regular expression capabilities in .NET. [^]

99% of what you know will transfer from PHP. The most obvious differences are that you do not start and end the pattern with a delimiter character and that you specify expression options (like the si at the end of your expression) differently. There are also some advanced things you can do with .NET regular expressions, but you probably will not need them here.

As for looping through the matches, you will probably use a while loop

using System.Text.RegularExpressions;

string phpFileText = /* load php file*/;
Regex matcher = new Regex(/* your pattern here */, 
                          /* your options here if not in the pattern itself*/);
Match code = matcher.Match(phpFileText);

while (code.Success)
{
    /* do stuff here */
    code = code.NextMatch();
}


PS: don't forget that ? is a quantifier in regular expressions, so you need to escape them when searching for a literal ?
QuestionProblem regarding grid Pin
ais0719-Dec-08 0:59
ais0719-Dec-08 0:59 
AnswerRe: Problem regarding grid Pin
Ashfield19-Dec-08 1:30
Ashfield19-Dec-08 1:30 
QuestionHow we can plugin the C# program to Eclipse Pin
TJS4u18-Dec-08 23:54
TJS4u18-Dec-08 23:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.