Re: problem with extended regular expression in bash 4.1

2012-11-26 Thread Chet Ramey
On 11/26/12 9:07 AM, Davide Brini wrote: >> Then maybe you have the compat31 option set (or your distro sets it for >> you), or you may have a patched, non-vanilla version of bash (redhat is >> well known for doing this). >> > > And indeed: > > https://groups.google.com/forum/?fromgroups=#!topic

Re: problem with extended regular expression in bash 4.1

2012-11-26 Thread Davide Brini
On Mon, 26 Nov 2012 05:40:09 -0800 (PST), chupin...@gmail.com wrote: > > It changed between bash 3.1 and 3.2, documented in the NEWS file. There > > is > > > > a "compat31" option that can be turned on to restore the 3.1 behavior. > > > > As you see it works for me in 3.25 Then maybe you have

Re: problem with extended regular expression in bash 4.1

2012-11-26 Thread Davide Brini
On Mon, 26 Nov 2012 15:03:35 +0100, Davide Brini wrote: > On Mon, 26 Nov 2012 05:40:09 -0800 (PST), chupin...@gmail.com wrote: > > > > It changed between bash 3.1 and 3.2, documented in the NEWS file. > > > There is > > > > > > a "compat31" option that can be turned on to restore the 3.1 behavi

Re: problem with extended regular expression in bash 4.1

2012-11-26 Thread chupin007
Thank you guys for comprehensive explanation. Regards, Alexander Chupin

Re: problem with extended regular expression in bash 4.1

2012-11-26 Thread chupin007
> It changed between bash 3.1 and 3.2, documented in the NEWS file. There is > > a "compat31" option that can be turned on to restore the 3.1 behavior. > As you see it works for me in 3.25

Re: problem with extended regular expression in bash 4.1

2012-11-26 Thread Greg Wooledge
On Sat, Nov 24, 2012 at 10:29:30PM +, Lawrence Steeger wrote: > Alex Chupin (achupin cisco.com> writes: > > $ bash --version; s=12345;if [[ "$s" =~ '^[0-9]+$' ]]; then echo it is a > number; else echo it is NOT a number; fi > The single quotes are being used in the match. If you remove them,

Re: problem with extended regular expression in bash 4.1

2012-11-24 Thread Lawrence Steeger
Alex Chupin (achupin cisco.com> writes: > > Dear All, > > Can someone shed light on the difference in behaviour of bash 4.1. and 3.25? I am out of ideas. > > Regards, > Alexander Chupin > > $ bash --version; s=12345;if [[ "$s" =~ '^[0-9]+$' ]]; then echo it is a number; else echo it is NOT a

Re: problem with extended regular expression in bash 4.1

2012-11-24 Thread Davide Brini
On Sat, 24 Nov 2012 21:08:16 +, "Alex Chupin (achupin)" wrote: > Dear All, > > Can someone shed light on the difference in behaviour of bash 4.1. and > 3.25? I am out of ideas. > > Regards, > Alexander Chupin > > $ bash --version; s=12345;if [[ "$s" =~ '^[0-9]+$' ]]; then echo it is a > n

problem with extended regular expression in bash 4.1

2012-11-24 Thread Alex Chupin (achupin)
Dear All, Can someone shed light on the difference in behaviour of bash 4.1. and 3.25? I am out of ideas. Regards, Alexander Chupin $ bash --version; s=12345;if [[ "$s" =~ '^[0-9]+$' ]]; then echo it is a number; else echo it is NOT a number; fi GNU bash, version 4.1.2(1)-release (x86_64-redh