Reg Expr bugs in vi? - (nf)

emrath at uiuccsb.UUCP emrath at uiuccsb.UUCP
Tue Sep 27 12:36:47 AEST 1983


#N:uiuccsb:6300001:000:929
uiuccsb!emrath    Sep 26 04:34:00 1983

There seems to be bugs in the reg expr searcher of vi.
Create a file of random text, such as:
skd jflksd jfsdlk
llkwejrlkw hllejrljlkajioerumm
jlrkwejrkw2345kld';l./,l sdfl

The following search patterns all seem to behave the same way.
/^[a-z]
/.*[a-z]
/[a-z].*

Furthermore, making the . a real non-letter, say "3", giving the expr:
/3*[a-z]
 
causes the search to NOT find a letter if it is the character right
after(before) the cursor.
/[a-z]3*  seems to work, however.


It seems to me, any time a "*"ed expr appears at either end of an expr,
it should be dropped off.  (Hmmmm,  "/3*" moves the cursor by two chars,
until you hit a blank line.)

I realize these are rather meaningless searches, but I ran across this
when I wanted to do:
/,.*[0-9]
and mistakenly entered:
/,*[0-9]
The fact that these cases don't seem to work lowers my faith in the searcher's
ability to produce the correct results on a meaningful pattern.



More information about the Comp.bugs.4bsd.ucb-fixes mailing list