Click here to Skip to main content
15,914,608 members
Home / Discussions / C#
   

C#

 
AnswerRe: printing url Pin
Nader Elshehabi25-Jun-06 23:59
Nader Elshehabi25-Jun-06 23:59 
Questionhow to encrypt/decrypt data on the fly ? Pin
hdv21225-Jun-06 12:13
hdv21225-Jun-06 12:13 
AnswerRe: how to encrypt/decrypt data on the fly ? Pin
Ed.Poore25-Jun-06 12:15
Ed.Poore25-Jun-06 12:15 
QuestionHow to make my application more cool Pin
ZHENG.YANG.POINTER25-Jun-06 10:17
professionalZHENG.YANG.POINTER25-Jun-06 10:17 
AnswerRe: How to make my application more cool Pin
Nader Elshehabi25-Jun-06 10:47
Nader Elshehabi25-Jun-06 10:47 
GeneralRe: How to make my application more cool Pin
Jun Du25-Jun-06 12:58
Jun Du25-Jun-06 12:58 
GeneralRe: How to make my application more cool Pin
Nader Elshehabi25-Jun-06 16:19
Nader Elshehabi25-Jun-06 16:19 
AnswerRe: Pinvoke CreateRemoteThread Pin
led mike25-Jun-06 8:36
led mike25-Jun-06 8:36 
GeneralRe: Pinvoke CreateRemoteThread Pin
Colin Angus Mackay25-Jun-06 23:06
Colin Angus Mackay25-Jun-06 23:06 
GeneralRe: Pinvoke CreateRemoteThread Pin
led mike26-Jun-06 5:41
led mike26-Jun-06 5:41 
QuestionRegular Expression to convert from PHP to C# Pin
AngryC25-Jun-06 7:09
AngryC25-Jun-06 7:09 
AnswerRe: Regular Expression to convert from PHP to C# Pin
User 665825-Jun-06 7:26
User 665825-Jun-06 7:26 
GeneralRe: Regular Expression to convert from PHP to C# Pin
AngryC25-Jun-06 7:43
AngryC25-Jun-06 7:43 
GeneralRe: Regular Expression to convert from PHP to C# Pin
Kevin McFarlane25-Jun-06 9:09
Kevin McFarlane25-Jun-06 9:09 
AnswerRe: Regular Expression to convert from PHP to C# [modified] Pin
Graham Nimbley25-Jun-06 9:28
Graham Nimbley25-Jun-06 9:28 
GeneralRe: Regular Expression to convert from PHP to C# Pin
AngryC25-Jun-06 11:02
AngryC25-Jun-06 11:02 
GeneralRe: Regular Expression to convert from PHP to C# [modified] Pin
User 665825-Jun-06 11:52
User 665825-Jun-06 11:52 
This is a different approach, maybe it works for you?

string regex = @"[\r\n]{1,2}(.+)\#(.*)[\r\n]{1,2}";

Match m = Regex.Match(input, regex);
if (m.Success)
{
	string output = String.Format("{0}{1}{2}{3}{4}\r", myRightVar, m.Groups[1], myCenterVar, m.Groups[2], myLeftVar);
	Console.WriteLine(output);
}


Probably this might also work, it's way shorter:

string output2 = Regex.Replace(input, regex, String.Format("{0}$1{1}$2{2}\r", myLeftVar, myCenterVar, myRightVar));


regards

modified 12-Sep-18 21:01pm.

GeneralRe: Regular Expression to convert from PHP to C# Pin
AngryC25-Jun-06 12:23
AngryC25-Jun-06 12:23 
GeneralRe: Regular Expression to convert from PHP to C# Pin
Graham Nimbley25-Jun-06 13:36
Graham Nimbley25-Jun-06 13:36 
GeneralRe: Regular Expression to convert from PHP to C# Pin
AngryC25-Jun-06 15:05
AngryC25-Jun-06 15:05 
GeneralRe: Regular Expression to convert from PHP to C# Pin
Graham Nimbley25-Jun-06 15:10
Graham Nimbley25-Jun-06 15:10 
GeneralRe: Regular Expression to convert from PHP to C# Pin
AngryC25-Jun-06 16:51
AngryC25-Jun-06 16:51 
GeneralRe: Regular Expression to convert from PHP to C# [modified] Pin
Graham Nimbley26-Jun-06 8:39
Graham Nimbley26-Jun-06 8:39 
GeneralRe: Regular Expression to convert from PHP to C# [modified] Pin
AngryC26-Jun-06 11:29
AngryC26-Jun-06 11:29 
GeneralRe: Regular Expression to convert from PHP to C# [modified] Pin
Graham Nimbley26-Jun-06 11:56
Graham Nimbley26-Jun-06 11:56 

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.