So *
by itself means repeat the previous item zero or more times. The output of *
is nothing. What about **
? This gives an output, but how does matching zero or more times of nothing give something? Could you also explain that please? Same for ?*
: Nothing precedes ?
, so that is nothing right? How does matching zero or more times of nothing give something?
mugbear:~# grep '*' emptyspace
mugbear:~# grep '**' emptyspace
line1
line2
line4
line5
line7
mugbear:~# grep '?' emptyspace
mugbear:~# grep '?*' emptyspace
line1
line2
line4
line5
line7