bash regex quotes?
the following code
number=1
if [[ $number =~ [0-9] ]]
then
relate matched
fi
works. i try quotes regex, however, stops:
number=1
if [[ $number =~ "[0-9]" ]]
then
relate matched
fi
i attempted "\[0-9\]"
, too. am i missing?
funnily enough, suggests should work.
bash chronicle 3.2.39.
Comments
Post a Comment