Gentoo Archives: gentoo-user

From: Michael Orlitzky <mjo@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] OT scripting - strip zero if between period and digit
Date: Wed, 23 Jan 2019 13:07:05
Message-Id: db2f9d8c-3ebb-fbb8-c23a-47c5b4ef96c4@gentoo.org
In Reply to: Re: [gentoo-user] OT scripting - strip zero if between period and digit by Wols Lists
1 On 1/23/19 5:52 AM, Wols Lists wrote:
2 >
3 > I've just done a bit of digging, and would this work to match an octet?
4 >
5 > [0-9][0-9]?[0-9]?
6 >
7
8 It doesn't match 0123. Regardless, using [0-9] is destined to fail
9 because it will match things like 999 that also aren't an octet.