Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-04 Thread H.-Dirk Schmitt
On Mo, 2017-12-04 at 16:49 -0500, Chet Ramey wrote: > The thing is, bash doesn't "implement" its regular expressions, per > se. > Bash uses the Posix standard library functions (regcomp/regexec) if > they > are available in the C library when it's configured and built. I'm > not > wild about

Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-04 Thread Chet Ramey
On 12/4/17 1:42 PM, H.-Dirk Schmitt wrote: > From the 2 replies I unterstand that the implementation in bash is > correct due to the „official“ standard. > > For myself I have solved the issue in my script - but the regular > expression I developed for my problem are without the 'non-greedy' >

Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-04 Thread H.-Dirk Schmitt
>From the 2 replies I unterstand that the implementation in bash is correct due to the „official“ standard. For myself I have solved the issue in my script - but the regular expression I developed for my problem are without the 'non-greedy' operator more difficult to read and maintain. From that

Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-03 Thread Chet Ramey
On 12/1/17 12:40 PM, d...@computer42.org wrote: > Bash Version: 4.4 > Patch Level: 12 > Release Status: release > > Description: > I'm sanitising urls from advertisement crap. As described below I'm getting > a wrong resolution of parenthesised expression defined with non-greedy > operator

Re: parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-01 Thread Greg Wooledge
On Fri, Dec 01, 2017 at 06:40:35PM +0100, d...@computer42.org wrote: > I'm sanitising urls from advertisement crap. As described below I'm getting > a wrong resolution of parenthesised expression defined with non-greedy > operator '?'. >

parenthesised regular expressions and non-greedy operator ? - non standard bash behaviour

2017-12-01 Thread dirk
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'