why are \d and \D not implemented but don't throw errors in regex?

2013-12-07 Thread Craig Steffen
Hi, I'm working on some bash scripts for work where I'm using a regular expression to grab a number from the output of another command. I've gotten fairly adept at using regular expressions, in perl mostly, but I just couldn't get it to work in bash. One reason was that the regex search is suppo

Re: why are \d and \D not implemented but don't throw errors in regex?

2013-12-07 Thread Peter Cordes
On Sat, Dec 07, 2013 at 11:06:22AM -0600, Craig Steffen wrote: > Hi, > > I'm working on some bash scripts for work where I'm using a regular > expression to grab a number from the output of another command. > > I've gotten fairly adept at using regular expressions, in perl mostly, > but I just co

Re: why are \d and \D not implemented but don't throw errors in regex?

2013-12-07 Thread Chet Ramey
On 12/7/13, 6:33 PM, Peter Cordes wrote: > I agree your complaint seems valid, but it's the behaviour of the > regex engine built into GNU libc (in this case). Bash on other > platforms would use the regex engine in their system libc. (Unless > I'm mistaken in my assumption that bash doesn't ha