Autor Beitrag
ebber
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 239
Erhaltene Danke: 1

Win XP, Win 7
C# (VS 2010), Delphi (2007), Expression 4
BeitragVerfasst: Fr 05.11.10 13:10 
Hallo,

ich habe ein kleines Regex Problem:

ausblenden Quelltext
1:
lineco.+dic					


finden soll es lineco und dann alles, bis das nächste mal dic kommt.
Leider findet es bei mir nicht das nächste, sondern das letzte.

Kann mir vielleicht jemand sagen was das Problem ist?

MfG
bakachan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 503
Erhaltene Danke: 34

W7 (x64) Ultimate
C# / VB.NET (VS2010 Ultimate)
BeitragVerfasst: Fr 05.11.10 13:14 
Das liegt an dem gierigen Verhalten vom +-Quantor.
Mach ein ? hinters + um das zu beheben.
ebber Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 239
Erhaltene Danke: 1

Win XP, Win 7
C# (VS 2010), Delphi (2007), Expression 4
BeitragVerfasst: Fr 05.11.10 13:17 
Danke. Es hat funktioniert, obwohl es schon ein wenig seltsam ist