Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

Niz MatchCollection?

[es] :: .NET :: Niz MatchCollection?

[ Pregleda: 1858 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

dontoo

Član broj: 249815
Poruke: 40
*.adsl.net.t-com.hr.



+1 Profil

icon Niz MatchCollection?26.03.2010. u 15:11 - pre 171 meseci
Dali je moguće deklarirati niz MatchCollection-a? Nešto kao:
Code:
        MatchCollection a;
        for (int i = 0; i < allParts.Count(); i++)
        {
            Regex regLet = new Regex("[a-z]");
            MatchCollection matchLetters;
            matchLetters = regLet.Matches(allParts[i]);
            a[i] = matchLetters;
        }

Isko kao niz od nizova ili niz od ArrayList-a.
 
Odgovor na temu

Igor Gajic

Član broj: 93194
Poruke: 747
*.0.fullrate.dk.



+987 Profil

icon Re: Niz MatchCollection?26.03.2010. u 20:57 - pre 171 meseci
Zasto ne koristis:

Code:

List<MatchCollection> matches = new List<MatchCollection>();

        for (int i = 0; i < allParts.Count(); i++)
        {
            Regex regLet = new Regex("[a-z]");
            MatchCollection matchLetters;
            matches.Add(regLet.Matches(allParts[i]));
        }
 
Odgovor na temu

sallle
Sasa Ninkovic
GTECH
Beograd

Član broj: 146
Poruke: 480
*.psit.rs.

ICQ: 20785904


+4 Profil

icon Re: Niz MatchCollection?29.03.2010. u 09:32 - pre 171 meseci
za taj regex , jednostavnije je da koristis uslove

Char.IsLetter(char) ili char.IsLower() ili

x>='a' && x<='z' (ovo je verovatno problematicno za unicode)
 
Odgovor na temu

dontoo

Član broj: 249815
Poruke: 40
*.adsl.net.t-com.hr.



+1 Profil

icon Re: Niz MatchCollection?03.04.2010. u 10:27 - pre 171 meseci
Nije mi palo na pamet koristiti listu ( nakon što sam postao topic sjetio sam se )
 
Odgovor na temu

[es] :: .NET :: Niz MatchCollection?

[ Pregleda: 1858 | Odgovora: 3 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.