Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!osupyr.mast.ohio-state.edu!gae From: gae@osupyr.mast.ohio-state.edu (Gerald Edgar) Newsgroups: comp.sys.mac.programmer Subject: MPW regexps Message-ID: <444@osupyr.mast.ohio-state.edu> Date: 18 Mar 88 13:22:52 GMT Reply-To: gae@osupyr.UUCP (Gerald Edgar) Organization: The Ohio State University, Dept. of Math. Lines: 25 I was trying to do some search-and-replace text editing using MPW regular expressions. Generally it works great. But here is one thing that I can do with Gnu Emacs, but I could not figure out with MPW. Suppose I have this line of text: Qabcabc I want to select everything from the character after the Q up to the matching character: Qbc. I tried various combinations, but without success. Is this possible? In these examples, R is the option-R symbol, R-in-a-circle, and X is the option-X symbol, wavy lines. replace /Q([a-z])R1XR1/ 'Q' replace /Q([a-z])R1/:/R1/ 'Q' Can these R constructions be used anywhere except in the second argument of a replace? A related question, perhaps of greater general interest: is there a regular expression that will match a string only if there are matched parentheses in the string? -- Gerald A. Edgar TS1871@OHSTVMA.bitnet Department of Mathematics gae@osupyr.UUCP The Ohio State University ...{akgua,gatech,ihnp4,ulysses}!cbosgd!osupyr!gae Columbus, OH 43210 70715,1324 CompuServe