home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / question / 14881 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  868 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!not-for-mail
  2. From: ren@function.mps.ohio-state.edu (Liming Ren)
  3. Newsgroups: comp.unix.questions
  4. Subject: A simple question about lex!
  5. Date: 22 Dec 1992 12:10:00 -0500
  6. Organization: Department of Mathematics, The Ohio State University
  7. Lines: 18
  8. Distribution: world
  9. Message-ID: <1h7i58INNms4@function.mps.ohio-state.edu>
  10. NNTP-Posting-Host: function.mps.ohio-state.edu
  11.  
  12. This is the first time I am using lex. I am puzzled by the following problem;
  13.  
  14. I want to match 
  15. beginning of line  .I followed by one or more space ,then a number and then 
  16. newline. For example
  17. .I  123\n
  18. .I   234\n
  19.  
  20.  
  21. I tested  ^\.I[ ]+ [0-9]+$ , ^\.I[ ]+[0-9]+$  and ^\.I [ ]+ [0-9]+$,
  22.  none of them  works!
  23.  
  24. I tried    ^\.I" "[0-9]+$  , it works only for patten with one space in between.
  25. Please help me to find the correct specification.
  26.  
  27.  
  28. Many thanks!
  29.  
  30.