Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site watmath.UUCP Path: utzoo!watmath!rjhurdal From: rjhurdal@watmath.UUCP (David Canzi) Newsgroups: net.unix-wizards Subject: Re: Comment recognition in Lex, again Message-ID: <7666@watmath.UUCP> Date: Fri, 4-May-84 17:58:05 EDT Article-I.D.: watmath.7666 Posted: Fri May 4 17:58:05 1984 Date-Received: Sat, 5-May-84 02:23:17 EDT References: <245@uwvax.ARPA> Organization: U of Waterloo, Ontario Lines: 10 The puzzles in net.unix-wizards are better than the ones in net.puzzle. I blew two hours composing this: "/*"[^*]*"*"+([^*/][^*]*"*"+)*"/" printf("<<<%s>>>", yytext) ; and tested it on this input: asdqwa/*/asaas*/werwer sdf/**/sdfsdf/***/erwerwer cvb/*tdfg*/*xcvcv*/werwe ty/bcvb/*******/***/fssdf and it appears to work. Please let me know if you come up with cases where it doesn't work...