Re: [PATCH v6 10/15] bugreport: add config values from safelist
- From
Andreas Schwab <schwab@linux-m68k.org>
- Date
- Feb 7, 2020, 16:51 UTC
- Message-ID
- <87zhdue3ye.fsf@igel.home>
- In-Reply-To
- <CAPig+cQ8vHjzBdMAemznFbyUSHOuJu167RHkTNg_qmqi-DOB3g@mail.gmail.com>
On Feb 07 2020, Eric Sunshine wrote:
Show 15 quoted lines
> On Fri, Feb 7, 2020 at 10:09 AM SZEDER Gábor <szeder.dev@gmail.com> wrote: >> macOS 'sed', that's what I was missing :) >> >> sed -n 's/^\(.*\) \+annotate:bugreport\[include\].* ::$/ "\1",/p' | sort >> >> and the 'sed' included in macOS apparently interprets that '\+' >> differently than GNU 'sed', and as a result won't match anything. > > More generally, this would be a problem with any 'sed' of BSD lineage. > >> FWIW, that '\+' doesn't seem to be necessary, though, and after >> removing it the resulting generated array looked good to me [...] > > A reasonable replacement for "<SP>\+" would be "<SP><SP>*" (where <SP> > represents 'space').
Another problem with that regexp is that it contains two adjacent repetitions matching the same character. When there are two or more spaces before "annotate:" all but the last of them can be matched by either '\(.*\)' or ' \+'. To fix that '\(.*\)' needs to be modified to not match a trailing space.
Andreas.
-- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."