TOLLIVER%ORN.MFENET@LLL-MFE.ARPA (11/25/86)
Preface: This is the second time I have submitted this question to INFO-VAX. I never saw the first one appear on INFO-VAX after I submitted it, and I have received no replies. I am beginning to wonder if the mailer I am using is working correctly. Could someone please answer the following questions: 1. Has anyone seen the message below before? 2. Approximately how many INFO-VAX messages have you been receiving per day or week? I get maybe 4 or 5 per day--sometimes more, but sometimes none at all for 2 or 3 days. Is this normal? Now, back to my original question: Does anyone understand VAXTPU pattern searches? Consider for example the following text: 1. next line has 3 b's and no trailing spaces bbb 2. next line has 6 (a multiple of 3) b's and no trailing spaces bbbbbb 3. next line has 7 (not a multiple of 3) b's and no trailing spaces bbbbbbb Position to the top of the file and then search for the pattern "bbb"&line_end. TPU will find it properly in cases 1 and 2 but cannot find it in case 3. Now position to the beginning of case 1 or case 2 and try again. This time, it will not find the matching pattern on the end of that line. Next, position to the beginning of case 3, or even the 4th "b" in case 3 and try again. This time it will work. What seems to be happening is that the string of 3 b's is found and the next character is compared against line_end. If it is a match, good. But if it is not a match, then the character position seems to move to the end of the 3 b's already matched and start trying again from there. This is in contrast to the documentation which seems to say that the character position will be incremented by one (not 3) before the search is tried again. By the way, there is nothing magic about 3. Works the same way with multiples of 4 when the search pattern is "bbbb"&line_end. Also, it can be fixed by, I think, forcing incremental search mode instead of seek search mode by using a search string of the form ""&"bbb"&line_end. But the documentation says that this forces incremental search mode in the case of an alternation pattern, not a simple concatenation. Is this a bug, or is the documentation bad, or am I just dense? Thanks for any help, TOLLIVER%ORN@LLL-MFE.ARPA P.S. I have seen references to pseudo-EMACS written in TPU. If anyone out there has such a set of TPU procedures, I would very much like to see how the unix-style "regular expressions" were implemented.
AArvani.es@XEROX.COM (12/01/86)
To answer your first two questions: 1) No, I had not seen your message before. But I might have deleted it before reading. 2) I get about 6 or 7 every day.