[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl5-porters
Subject:    Re: Pre-RFC: s/.../.../gg Really globally substitute
From:       Dan Book <grinnz () gmail ! com>
Date:       2022-06-29 17:04:00
Message-ID: CABMkAVXyEbeQTDv7JvN_ic+rCJ6MsQXf6DuV4L=iNNg5NmjMmA () mail ! gmail ! com
[Download RAW message or body]

On Wed, Jun 29, 2022 at 9:50 AM G.W. Haywood via perl5-porters <
perl5-porters@perl.org> wrote:

> Hi there,
>
> On Wed, 29 Jun 2022, James Raspass wrote:
>
> > ...
> > I feel like we could replace this pattern with a dedicated flag that
> > is clearer and potentially faster, /gg, e.g.
> >
> > s/(\d)(\d\d\d)(?!\d)/$1,$2/gg;
> > ...
> > Thoughts?
>
> I don't see any pressing need.
>
> It would just be asking for problems.
>
> I prefer it the way it is.
>
> There are more important things to be getting on with.
>

I have had a couple instances where this would be useful. But I have to
agree, it is not worth a feature for when the use case is rare and one can
simply loop. Additionally I would have a concern that such a feature would
commonly lead to infinite looping.

-Dan

[Attachment #3 (text/html)]

<div dir="ltr"><div dir="ltr">On Wed, Jun 29, 2022 at 9:50 AM G.W. Haywood via \
perl5-porters &lt;<a \
href="mailto:perl5-porters@perl.org">perl5-porters@perl.org</a>&gt; \
wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex">Hi there,<br> <br>
On Wed, 29 Jun 2022, James Raspass wrote:<br>
<br>
&gt; ...<br>
&gt; I feel like we could replace this pattern with a dedicated flag that<br>
&gt; is clearer and potentially faster, /gg, e.g.<br>
&gt;<br>
&gt; s/(\d)(\d\d\d)(?!\d)/$1,$2/gg;<br>
&gt; ...<br>
&gt; Thoughts?<br>
<br>
I don&#39;t see any pressing need.<br>
<br>
It would just be asking for problems.<br>
<br>
I prefer it the way it is.<br>
<br>
There are more important things to be getting on \
with.<br></blockquote><div><br></div><div>I have had a couple instances where this \
would be useful. But I have to agree, it is not worth a feature for when the use case \
is rare and one can simply loop. Additionally I would have a concern that such a \
feature would commonly lead to infinite looping.</div><div><br></div><div>-Dan  \
</div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic