Path: utzoo!mnetor!uunet!husc6!m2c!ulowell!cg-atla!ring From: ring@cg-atla.UUCP (Steve Ring) Newsgroups: comp.text Subject: troff question Message-ID: <1265@cg-atla.UUCP> Date: 13 Jan 88 20:01:51 GMT Organization: Compugraphic Corp., Wilmington, Mass Lines: 44 Keywords: troff When I create a macro, say .de XX . \" Ignore trailing blank(s), tab, .ie '\\$1' ' \{\ . tm calling NO ARGS: . IP .\} .el .ie '\\$1' ' \{\ . tm calling NO ARGS: . IP .\} .el \{\ . tm calling with ARGS: ["\\$1"] ["\\$2"] . IP "\\$1" "\\$2"\} .. I want to call it with either .XX or .XX but if the user has left over and/or on the end of the .XX line (when used without parameters), the macro will use these unwanted as arguments. The problem is that is you have on a macro line . then the sees as argument $1 I want to skip over these. I can test for each one individually as I have above, but what about the following combinations: .XX .XX .XX .XX in another words, I want the following, somewhat like in sed (sed -e 's/[]*//' to get rid of multiple characters). .ie '\\$1'[]*' .IP \" There are no arguments .el .IP \\$1 \\$2 Any help???-- Steve Ring, Compugraphic Corp. Wilmington, Mass. 01887 (617)658-5600 X5092 "Transplanted Buckeye - Go BROWNS!" ...!{decvax,ima,ism780c,ulowell,laidbak,cgeuro,cg-f}!cg-atla!ring