$ grep --version
grep (GNU grep) 2.5.1

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR 
PURPOSE.

$ cat file
field1;field2;field3
field4;field5;field6

$ grep -o '[^;]\+' file1
field1
field2
field3
field4
field5
field6

$ grep -o '[^;]*' file
field1
field4


The output of the first grep invocation is as expected, and I thought the 
output of the second invocation should be the same, which isn't the 
case. Is that expected behavior?

Thanks


Reply via email to