Re: Regex: A case where the longest match isn't being found

2023-10-26 Thread Lawrence Velázquez
On Fri, Oct 27, 2023, at 12:25 AM, Grisha Levit wrote: > On Thu, Oct 26, 2023, 20:30 Dale R. Worley wrote: > >> I suspect the difference between the versions is how the regexp is >> unquoted while it is being read, with version 3 interpreting [^\'] as >> "character class excluding newline, backsla

Re: Regex: A case where the longest match isn't being found

2023-10-26 Thread Grisha Levit
On Thu, Oct 26, 2023, 20:30 Dale R. Worley wrote: > I suspect the difference between the versions is how the regexp is > unquoted while it is being read, with version 3 interpreting [^\'] as > "character class excluding newline, backslash, and quote" and version 5 > interpreting it as "character

anomalies during "make test"

2023-10-26 Thread martin
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 uname output: Linux treehug.home.kurahaupo.gen.nz 5.15.0-73-generic #80-Ubuntu SMP Mon May 15 15:18:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux Machine Type: x8

Re: the test shell script never returns to shell

2023-10-26 Thread wenlin
On 10/26/2023 22:08, Chet Ramey wrote: CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. On 10/24/23 11:14 PM, Wenlin Kang wrote: Hi I want to report a bug, it rarely observes

Re: Regex: A case where the longest match isn't being found

2023-10-26 Thread Dan Bornstein
Thanks to the folks who replied. Indeed, I misunderstood the "longest match" rule to apply to captures and not just the whole string. (That is, I thought an earlier capture would get "first dibs" on any matching text.) And, as was pointed out by Greg W, the exact behavior depends more on the re

Re: Regex: A case where the longest match isn't being found

2023-10-26 Thread Lawrence Velázquez
On Thu, Oct 26, 2023, at 7:01 PM, Greg Wooledge wrote: > On Thu, Oct 26, 2023 at 10:50:13AM -0700, Dan Bornstein wrote: >> I found a case where the regex evaluator doesn't seem to be finding the >> longest possible match for a given expression. The expression works as >> expected on an older vers

Re: Regex: A case where the longest match isn't being found

2023-10-26 Thread Dale R. Worley
"Dan Bornstein" writes: > I found a case where the regex evaluator doesn't seem to be finding > the longest possible match for a given expression. The expression > works as expected on an older version of Bash (3.2.57(1)-release > (arm64-apple-darwin22)). > > Here's the regex: ^(\$\'([^\']|\\\')*\

Re: Regex: A case where the longest match isn't being found

2023-10-26 Thread Greg Wooledge
On Thu, Oct 26, 2023 at 10:50:13AM -0700, Dan Bornstein wrote: > I found a case where the regex evaluator doesn't seem to be finding the > longest possible match for a given expression. The expression works as > expected on an older version of Bash (3.2.57(1)-release > (arm64-apple-darwin22)).

Re: Fwd: Strange results

2023-10-26 Thread Kerin Millar
On Fri, 27 Oct 2023 02:00:01 +0700 Victor Pasko wrote: > -- Forwarded message - > From: Victor Pasko > Date: Fri, Oct 27, 2023 at 1:57 AM > Subject: Re: Strange results > To: Dennis Williamson > > > > Also > > echo10 ${ASCII_SET:$((-10)):1} This is the "Substring Expansion"

Regex: A case where the longest match isn't being found

2023-10-26 Thread Dan Bornstein
Configuration Information [Automatically generated, do not change]: Machine: aarch64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -O2 -ftree-vectorize -flto=auto -ffat-lto-objects -fexcepti\ ons -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY\ _SOURCE=2 -Wp,-D_GLIBCXX

Re: Strange results

2023-10-26 Thread alex xmb sw ratchev
On Thu, Oct 26, 2023, 9:07 PM Victor Pasko wrote: > -- Forwarded message - > From: Victor Pasko > Date: Fri, Oct 27, 2023 at 1:57 AM > Subject: Re: Strange results > To: Dennis Williamson > > > > Also > > echo10 ${ASCII_SET:$((-10)):1} > > and > > echo11 ${ASCII_SET:-10:1} > > h

Fwd: Strange results

2023-10-26 Thread Victor Pasko
-- Forwarded message - From: Victor Pasko Date: Fri, Oct 27, 2023 at 1:57 AM Subject: Re: Strange results To: Dennis Williamson Also echo10 ${ASCII_SET:$((-10)):1} and echo11 ${ASCII_SET:-10:1} have different behaviour:( Both of these say "output the character that's 10th

Fwd: Strange results

2023-10-26 Thread Dennis Williamson
-- Forwarded message - From: Dennis Williamson Date: Thu, Oct 26, 2023 at 12:09 PM Subject: Re: Strange results To: Victor Pasko echo "echo11 ${ASCII_SET:-10:1}"echo "echo11 ${ASCII_SET:-10:1}" On Thu, Oct 26, 2023 at 9:54 AM Victor Pasko wrote: > Hi, > > echo9 u > echo10 u >

Re: Strange results

2023-10-26 Thread Chet Ramey
On 10/26/23 10:53 AM, Victor Pasko wrote: See some strange results below echo9 u echo10 u And the most strange result echo11 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Why do you think the results are strange? What are you expecting? --

Strange results

2023-10-26 Thread Victor Pasko
Hi, Attached please find bug2.bash. Here are results % bash --version GNU bash, version 5.2.15(3)-release (x86_64-pc-cygwin) % ./bug2.bash ASCII_SET-size=95 echo1 u echo2 u echo3 u echo4 97 echo5 u echo6 85 echo7 -10 echo8 -10 See some strange results below echo9 u echo10 u And the most strange

Re: the test shell script never returns to shell

2023-10-26 Thread Chet Ramey
On 10/24/23 11:14 PM, Wenlin Kang wrote: Hi I want to report a bug, it rarely observes the problem while running shell script aborting test repeatedly. At the problem, the test shell script never returns to shell. Thanks for the report. I think some slight code rearranging can fix this. Che

Re: BUG: Colorize background of whitespace

2023-10-26 Thread Oğuz
On Thursday, October 26, 2023, Phi Debian wrote: > On Wed, Oct 25, 2023 at 5:01 PM Greg Wooledge wrote: > > > > > Ahh. That wasn't clear to me. Thanks. > > > > > Ouch got caught the same way. This can be reduced to > > $ clear > $ echo "\e[36;44;4m\nsome colored\ttext with\ttabs\e[m\n" > $ #

Re: BUG: Colorize background of whitespace

2023-10-26 Thread Phi Debian
On Wed, Oct 25, 2023 at 5:01 PM Greg Wooledge wrote: > > Ahh. That wasn't clear to me. Thanks. > > Ouch got caught the same way. This can be reduced to $ clear $ echo "\e[36;44;4m\nsome colored\ttext with\ttabs\e[m\n" $ # Recall and run prev command repeat the later until top lines scroll out