Click here to Skip to main content
15,887,485 members
Home / Discussions / C#
   

C#

 
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 
AnswerRe: How we can plugin the C# program to Eclipse Pin
Ashfield19-Dec-08 1:29
Ashfield19-Dec-08 1:29 
QuestionHow can I use a MemoryStream in a System.Generic.List<> Pin
mbudak18-Dec-08 23:31
mbudak18-Dec-08 23:31 
AnswerRe: How can I use a MemoryStream in a System.Generic.List<> Pin
J4amieC18-Dec-08 23:52
J4amieC18-Dec-08 23:52 
GeneralRe: How can I use a MemoryStream in a System.Generic.List<> Pin
mbudak19-Dec-08 0:35
mbudak19-Dec-08 0:35 
GeneralRe: How can I use a MemoryStream in a System.Generic.List<> Pin
J4amieC19-Dec-08 1:16
J4amieC19-Dec-08 1:16 
GeneralRe: How can I use a MemoryStream in a System.Generic.List<> Pin
mbudak19-Dec-08 2:14
mbudak19-Dec-08 2:14 
GeneralRe: How can I use a MemoryStream in a System.Generic.List<> Pin
Mark Salsbery19-Dec-08 5:34
Mark Salsbery19-Dec-08 5:34 
Questionhow do import class of c++ to c# ? Pin
ahmeteor18-Dec-08 23:28
ahmeteor18-Dec-08 23:28 
AnswerRe: how do import class of c++ to c# ? Pin
benjymous19-Dec-08 0:16
benjymous19-Dec-08 0:16 
Questionhow i convert LinkButton to Button? Pin
Ravi Munde18-Dec-08 22:57
Ravi Munde18-Dec-08 22:57 
AnswerRe: how i convert LinkButton to Button? Pin
Expert Coming18-Dec-08 23:03
Expert Coming18-Dec-08 23:03 
GeneralRe: how i convert LinkButton to Button? Pin
Ravi Munde18-Dec-08 23:22
Ravi Munde18-Dec-08 23:22 
GeneralRe: how i convert LinkButton to Button? Pin
Expert Coming18-Dec-08 23:30
Expert Coming18-Dec-08 23:30 
GeneralRe: how i convert LinkButton to Button? Pin
J4amieC18-Dec-08 23:47
J4amieC18-Dec-08 23:47 

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.