Fabian Holler wrote:
> Yes thats right, but that isn't my problem.
> The problem is in the "(?=(iface)|$)" part.
no, the problem is that you're thinking "procedural string matching from
left to right", but that's not how regular expressions work.
> I have i.e. the text:
>
> "auto lo eth0
> ifa
Hello Marc,
thank you for your answer.
Marc 'BlackJack' Rintsch wrote:
> In <[EMAIL PROTECTED]>, Fabian Holler wrote:
>> i have the following regex "iface lo[\w\t\n\s]+(?=(iface)|$)"
>>
>> If "iface" don't follow after the regex "iface lo[\w\t\n\s]" the rest of
>> the text should be selected.
>
In <[EMAIL PROTECTED]>, Fabian Holler wrote:
> Howdy,
>
>
> i have the following regex "iface lo[\w\t\n\s]+(?=(iface)|$)"
>
> If "iface" don't follow after the regex "iface lo[\w\t\n\s]" the rest of
> the text should be selected.
> But ?=(iface) is ignored, it is always the whole texte selected