On 3/6/15 4:35 PM, Stephane Chazelas wrote:
> 2015-03-06 11:43:24 -0500, Chet Ramey:
>> On 3/5/15 12:36 PM, Greg Wooledge wrote:
>>> On Thu, Mar 05, 2015 at 05:26:00PM +, Stephane Chazelas wrote:
The bash manual only points to regex(3).
So it's down to your system's regex library
2015-03-06 11:43:24 -0500, Chet Ramey:
> On 3/5/15 12:36 PM, Greg Wooledge wrote:
> > On Thu, Mar 05, 2015 at 05:26:00PM +, 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 rec
On 3/5/15 9:51 AM, Eduardo A. Bustamante López wrote:
> On Thu, Mar 05, 2015 at 02:26:48PM +, Jason Vas Dias wrote:
>> Good day list, Chet -
>>
>> I think this is a bug:
>> ( set -x ; tab=$'\011'; s="some text: 1.2.3";
>> if [[ "$s" =~ ^some text:[\ $tab]+([0-9.]+) ]]; then
>> echo "${B
On 3/5/15 12:36 PM, Greg Wooledge wrote:
> On Thu, Mar 05, 2015 at 05:26:00PM +, 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 a
On 3/5/15 9:26 AM, Jason Vas Dias wrote:
> Good day list, Chet -
>
> I think this is a bug:
> ( set -x ; tab=$'\011'; s="some text: 1.2.3";
> if [[ "$s" =~ ^some text:[\ $tab]+([0-9.]+) ]]; then
> echo "${BASH_REMATCH[1]}";
> fi
> )
> -bash: syntax error in conditional expression
> -bash
2015-03-05 12:36:39 -0500, Greg Wooledge:
> On Thu, Mar 05, 2015 at 05:26:00PM +, 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
On Thu, Mar 05, 2015 at 05:26:00PM +, 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'.
G
2015-03-05 12:14:21 -0500, Greg Wooledge:
> On Thu, Mar 05, 2015 at 05:07:44PM +, Stephane Chazelas wrote:
> > bash also supports \s, but that's more for [[:space:]] (so
> > includes vertical spacing like CR, LF), and you need to use an
> > intermediary variable:
> >
> > r='^some text:\s+([0-9
On Thu, Mar 05, 2015 at 05:07:44PM +, Stephane Chazelas wrote:
> bash also supports \s, but that's more for [[:space:]] (so
> includes vertical spacing like CR, LF), and you need to use an
> intermediary variable:
>
> r='^some text:\s+([0-9.]+)'
> [[ $s =~ $r ]]
Woah! What? Where is *that*
2015-03-05 14:26:48 +, Jason Vas Dias:
> Good day list, Chet -
>
> I think this is a bug:
> ( set -x ; tab=$'\011'; s="some text: 1.2.3";
> if [[ "$s" =~ ^some text:[\ $tab]+([0-9.]+) ]]; then
> echo "${BASH_REMATCH[1]}";
> fi
> )
> -bash: syntax error in conditional expression
> -ba
On Thu, Mar 05, 2015 at 02:26:48PM +, Jason Vas Dias wrote:
> Good day list, Chet -
>
> I think this is a bug:
> ( set -x ; tab=$'\011'; s="some text: 1.2.3";
> if [[ "$s" =~ ^some text:[\ $tab]+([0-9.]+) ]]; then
> echo "${BASH_REMATCH[1]}";
> fi
> )
> -bash: syntax error in conditi
11 matches
Mail list logo