(1) grep '?'   # matches literal ?
               # (i would expect a parse error, but whatever)
(2) grep '\?'  # also matches literal ?
(3) grep ' \?' # matches everything, but given that the last
               # expression matches a literal ?, i would expect this
               # to match a space followed by a literal ?

notice that * does not have the same behavior:
(4) grep '*'   # matches literal *
               # (i would expect a parse error, but whatever)
(5) grep '\*'  # matches literal *
(6) grep ' \*' # matches space followed by literal *

cases (3) and (6) behave differently.  imo (6) looks reasonable, but (3)
does not.  could someone comment on whether this is working as intended,
and if so, what is the rationale?

- chris

Reply via email to