Guten Abend,
Ich habe folgendes Programm
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Net;
namespace ConsoleApplication3
{
class Program
{
static void Main(string[] args)
{
//Load Source.
WebClient siteurl = new WebClient();
string source = siteurl.DownloadString("http://online-hiorg.square7.de");
//REXEXP.
Regex myregex = new Regex("(?s).+?.+?(.\*?)");
bool wahr = myregex.IsMatch(source);
Console.WriteLine(wahr);
MatchCollection matches = myregex.Matches(source);
// Report the number of matches found.
Console.WriteLine("{0} matches found in:\n {1}",
matches.Count,
myregex);
// Report on each match.
foreach (Match match in matches)
{
GroupCollection groups = match.Groups;
Console.WriteLine("'{0}' repeated at positions {1} and {2}",
groups["word"].Value,
groups[0].Index,
groups[1].Index);
}
}
}
}
Das Regexp funktioniert aber leider nicht Richtig.
Kann mir Jemand sagen wieso?
JuraX