Re: vi - inability to search backwards for ?

2023-05-14 Thread Jeremy Mates
On 2023-05-13 20:53:01 -0700, Kastus Shchuka wrote: > Have you tried using ?[\?] in extended mode? It works for me. Yes, that's already in the blog posting and is a bit more to type and remember than a ?\?

Re: vi - inability to search backwards for ?

2023-05-13 Thread Kastus Shchuka
On Fri, May 12, 2023 at 11:11:23PM -0700, Jeremy Mates wrote: > A search for /\/ is okay; this discards the \ and searches for "/" > > A search for ?\? is not okay; this discards the \ and searches for "?" > which is an invalid regular expression, "RE error: repetition-operator > operand

Re: vi - inability to search backwards for ?

2023-05-13 Thread Jeremy Mates
On 2023-05-13 10:26:42 +0200, Andreas Kusalananda Kähäri wrote: > I'm assuming this is with the "extended" option set in vi, right? Yes.

Re: vi - inability to search backwards for ?

2023-05-13 Thread Andreas Kusalananda Kähäri
On Fri, May 12, 2023 at 11:11:23PM -0700, Jeremy Mates wrote: > A search for /\/ is okay; this discards the \ and searches for "/" > > A search for ?\? is not okay; this discards the \ and searches for "?" > which is an invalid regular expression, "RE error: repetition-operator > operand

vi - inability to search backwards for ?

2023-05-13 Thread Jeremy Mates
A search for /\/ is okay; this discards the \ and searches for "/" A search for ?\? is not okay; this discards the \ and searches for "?" which is an invalid regular expression, "RE error: repetition-operator operand invalid". A problematic bare leading ? on a backwards search can be escaped by