People,
This behaves as expected:
echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//g'
but I would expect this:
echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//'
to delete the first string of digits but it doesn't do anything . .
clarification from a sed guru?
On Tue, May 3, 2016 at 10:44 PM, Philip Rhoades wrote:
> People,
>
> This behaves as expected:
>
> echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//g'
>
> but I would expect this:
>
> echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//'
>
> to delete the first string
On 05/04/2016 12:44 AM, Philip Rhoades wrote:
People,
This behaves as expected:
echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//g'
but I would expect this:
echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//'
to delete the first string of digits but it doesn't
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On 2016/5/4 15:50, dwoody5654 wrote:
> On 05/04/2016 12:44 AM, Philip Rhoades wrote:
>> People,
>>
>> This behaves as expected:
>>
>> echo 'This is a test 12335 and 669384 535xy4' | sed
>> 's/[0-9]*//g'
>>
>> but I would expect this:
>>
>> echo '
On Wed, May 04, 2016 at 03:44:26PM +1000, Philip Rhoades wrote:
> People,
>
> This behaves as expected:
>
> echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//g'
>
> but I would expect this:
>
> echo 'This is a test 12335 and 669384 535xy4' | sed 's/[0-9]*//'
>
> to delete the
On 05/04/2016 10:09 AM, Jon LaBadie wrote:
The '*' means "zero or more digits". Don't forget that zero.
The first match is where there are zero digits, i.e. at the
beginning of the line. So sed replaces it with "//" (nothing).
However, usually regexps are greedy so they match as much as possib
On Wed, May 04, 2016 at 10:42:20AM -0700, Samuel Sieb wrote:
> On 05/04/2016 10:09 AM, Jon LaBadie wrote:
> > The '*' means "zero or more digits". Don't forget that zero.
> > The first match is where there are zero digits, i.e. at the
> > beginning of the line. So sed replaces it with "//" (nothi
On 05/04/2016 11:32 AM, Jon LaBadie wrote:
Traditionally sed has used basic RE syntax not the extended
syntax that includes "+". If the OP uses a sed such as
exists on my systems, you can get extended RE syntax with
the "-r" option.
sed -r 's/[0-9]+//'
Samuel, does your sed support extende
Samuel Sieb, Wed, 4 May 2016 10:42:20 -0700:
> On 05/04/2016 10:09 AM, Jon LaBadie wrote:
>> The '*' means "zero or more digits". Don't forget that zero.
>> The first match is where there are zero digits, i.e. at the
>> beginning of the line. So sed replaces it with "//" (nothing).
>>
> However,
On 05/04/2016 03:29 PM, Markus Schönhaber wrote:
Samuel Sieb, Wed, 4 May 2016 10:42:20 -0700:
On 05/04/2016 10:09 AM, Jon LaBadie wrote:
The '*' means "zero or more digits". Don't forget that zero.
The first match is where there are zero digits, i.e. at the
beginning of the line. So sed repl
On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:
> Oh, right. I never use a regexp that can match nothing, so I missed
> that. :-)
You never use '*'?
poc
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
http://lists.fedoraproject.org/admin/
On 5 May 2016 at 10:27, Patrick O'Callaghan wrote:
> On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:
>> Oh, right. I never use a regexp that can match nothing, so I missed
>> that. :-)
>
> You never use '*'?
>
I guess he meant "match *only* nothing", most of the time using *
you'll still u
On 05/05/2016 03:35 AM, Ian Malone wrote:
On 5 May 2016 at 10:27, Patrick O'Callaghan wrote:
On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:
Oh, right. I never use a regexp that can match nothing, so I missed
that. :-)
You never use '*'?
I guess he meant "match *only* nothing", most
On Thu, May 05, 2016 at 08:56:51AM -0700, Samuel Sieb wrote:
> On 05/05/2016 03:35 AM, Ian Malone wrote:
> > On 5 May 2016 at 10:27, Patrick O'Callaghan wrote:
> > > On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:
> > > > Oh, right. I never use a regexp that can match nothing, so I missed
>
On 05/05/2016 08:56 AM, Samuel Sieb wrote:
On 05/05/2016 03:35 AM, Ian Malone wrote:
On 5 May 2016 at 10:27, Patrick O'Callaghan
wrote:
On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:
Oh, right. I never use a regexp that can match nothing, so I missed
that. :-)
You never use '*'?
I
On 05/05/2016 10:11 AM, Rick Stevens wrote:
On 05/05/2016 08:56 AM, Samuel Sieb wrote:
On 05/05/2016 03:35 AM, Ian Malone wrote:
On 5 May 2016 at 10:27, Patrick O'Callaghan
wrote:
On Wed, 2016-05-04 at 16:24 -0700, Samuel Sieb wrote:
Oh, right. I never use a regexp that can match nothing, s
On Thu, 2016-05-05 at 10:31 -0700, Samuel Sieb wrote:
> On 05/05/2016 10:11 AM, Rick Stevens wrote:
> >
> > On 05/05/2016 08:56 AM, Samuel Sieb wrote:
> > >
> > > On 05/05/2016 03:35 AM, Ian Malone wrote:
> > > >
> > > > On 5 May 2016 at 10:27, Patrick O'Callaghan > > > com>
> > > > wrote:
> >
On 05/05/2016 01:47 PM, Patrick O'Callaghan wrote:
On Thu, 2016-05-05 at 10:31 -0700, Samuel Sieb wrote:
On 05/05/2016 10:11 AM, Rick Stevens wrote:
On 05/05/2016 08:56 AM, Samuel Sieb wrote:
On 05/05/2016 03:35 AM, Ian Malone wrote:
On 5 May 2016 at 10:27, Patrick O'Callaghan
wrote:
On
Allegedly, on or about 05 May 2016, Samuel Sieb sent:
> Yes, that's what I meant. I can't imagine where that would even be
> useful.
Matching nothing? Testing for a null response.
--
[tim@localhost ~]$ uname -rsvp
Linux 3.9.10-100.fc17.x86_64 #1 SMP Sun Jul 14 01:31:27 UTC 2013 x86_64
Boilerp
On Thu, 2016-05-05 at 13:56 -0700, Samuel Sieb wrote:
> > I fail to see what's odd about it. When you match something with an
> > optional part it's completely normal.
> >
> Thank you for making my point once again...
> This is about the case where the entire regexp will match the empty
> string!
20 matches
Mail list logo