bug-bash
[Top][All Lists]
Advanced

[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/1.4.2.3i

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
s

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



reply via email to

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