File:  [CSRG BSD Unix] / 42BSD / usr.lib / learn / editor / L35.2a
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

#print
The '*' character is also used in the editor patterns (the regular
expressions) but it has quite a different meaning from '*'
as used in filenames.  In the editor it means "any
number of repetitions of the previous character."  Thus
  a*
might match "a" or "aa" or "aaa" or "aaaa" and so on.
It might also match nothing, because "any number
of repetitions" includes "zero"!  Perhaps it
will be clearer after you do the following example.
Note what happens to the two lines.  Type

ex file
1,2p
1s/xa*/xy/
2s/xa*/xy/
1,2p
wq
ready
#create Ref
abxy
abxycd
#create file
abxaaa
abxcd
#user
#cmp file Ref
#log
#next
35.2b 5

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.