On Wed, Apr 13, 2011 at 12:28:39PM -0700, Greg Wooledge wrote:
> On Wed, Apr 13, 2011 at 11:19:22AM -0700, Ray Van Dolson wrote:
> > I'm trying to get regular expression matching working on both bash v3
> > as well as v4.
>
> Put the RE in a variable.
>
> > The
I'm trying to get regular expression matching working on both bash v3
as well as v4.
The following works on v4 (under RHEL6), but not under bash 3.00.15
(under RHEL4):
[[ "6Server" =~ ([0-9]+)(.*) ]]
This works on 3.00.15, but not under RHEL6's bash (4.1.2):
[[ "6Server" =~ '([0-9]+)(.*)' ]]
T