[Top][All Lists]

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

Re: bash-4.3.33 regexp bug

From: Greg Wooledge
Subject: Re: bash-4.3.33 regexp bug
Date: Thu, 5 Mar 2015 12:36:39 -0500
User-agent: Mutt/

On Thu, Mar 05, 2015 at 05:26:00PM +0000, Stephane Chazelas wrote:
> The bash manual only points to regex(3).
> So it's down to your system's regex library (uses
> regcomp(REG_EXTENDED)) which on recent GNU systems supports \s.

I see.  So it's another nonportable feature like printf '%(%s)T'.
Good to know!

imadev:~$ s='foo bar'; r='\s'; if [[ $s =~ $r ]]; then echo match; fi
imadev:~$ printf '%(%s)T\n' -1

address@hidden:~$ s='foo bar'; r='\s'; if [[ $s =~ $r ]]; then echo match; fi
address@hidden:~$ printf '%(%s)T\n' -1

reply via email to

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