En cours

Place regular expressions into string array

Hello, this is my problem.

I have the following function in C#:

I want to place all captured regex patterns into this string array however with a static id.

Say for this instance we got a static value of "emailaccount1"

I want to place all captured regex patterns into arrBuffer like so

arrBuff = { "email1" , msgID[1], subID[1], userID[1]};

arrBuff = {"email1", msgID[2], subID[2], userID[2]};

this can be achieved via for loop, however i do not want to loop through all three patterns with different for loops.

I want one for loop to be used to iterate through all three regex patterns.

//=====================================================================================

public void t_inboxParser(string incomingData)

{

//-----------------------

//Begin regex patterns

//-----------------------

string msgID = @"msgId=(\d*)""",

userID = @"username"">(.*?)(.*?)</";

var test = new List();

MatchCollection _PageData = [url removed, login to view](incomingData, pageData, [url removed, login to view]),

_msgData = [url removed, login to view](incomingData, msgID, [url removed, login to view]),

_subjData = [url removed, login to view](incomingData, subID, [url removed, login to view]),

userIDData = [url removed, login to view](incomingData, userID, [url removed, login to view]);

int msgIDCount = [url removed, login to view],

pageDataCount = [url removed, login to view],

subIDCount = [url removed, login to view],

userIDCount = [url removed, login to view];

string[] arrBuffer = "";

if ((msgIDCount == subIDCount) && (subIDCount == userIDCount))

{

I want to place all captured regex patterns into this string array however with a static id.

Say for this instance we got a static value of "emailaccount1"

I want to place all captured regex patterns into arrBuffer like so

arrBuff = { "email1" , msgID[1], subID[1], userID[1]};

arrBuff = {"email1", msgID[2], subID[2], userID[2]};

this can be achieved via for loop, however i do not want to loop through all three patterns with different for loops.

I want one for loop to be used to iterate through all three regex patterns.

}

}

//=====================================================================================

Thanks,

John

Compétences : .NET, Programmation C#

Voir plus : to string, the string problem, string the, string programming, string problem, string in c programming, string i, regular expressions list, regular expressions in c, regular expressions c, regex matches, regex in c, regex c, programming patterns, programming loops, programming array, loops programming, loops in programming, loop net, for loop in c programming, for loop c programming, c string programming, c regular expressions, c programming regex, c programming loops

Concernant l'employeur :
( 14 commentaires ) Panama City, United States

N° du projet : #4640881

Décerné à :

tano8753

It's very easy for me. Let's me help you.

5 $ USD / heure
(0 Commentaires)
0.0

4 freelances ont fait une offre moyenne de 8 $ /heure pour ce travail

vinsoneric

Hi, I can work on this. Thanks

6 $ USD / heure
(2 Commentaires)
3.1
friend511

Ready to work

16 $ USD / heure
(0 Commentaires)
0.0
chetandawale

This kind of scenario I have handled in my previous project I would like to do the work with you for this. Please let me know if u are interested to contact with me

6 $ USD / heure
(0 Commentaires)
0.0