sed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unexpected match of s command regexp at ^


From: Christoph Anton Mitterer
Subject: Re: unexpected match of s command regexp at ^
Date: Fri, 07 Jan 2022 06:55:50 +0100
User-agent: Evolution 3.42.2-1

Hey Davide.

Seems I had overseen your reply back then and saw it just now by
accident when looking for something else in the archives. O:-)


On Tue, 2021-09-28 at 20:06 +0200, Davide Brini wrote:
> Because you're doing \(....\)* which matches ZERO or more instances
> of
> what's inside the parentheses. In this particular case, it matches
> zero
> instances.

plus

> you're not using the /g modifier
> to the
> s/// command, so only the first match is replaced.

Damn... it's so obvious.

Thanks for your hint... no idea why I couldn't see that myself ^^


Cheers,
Chris.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]