Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!mentor.cc.purdue.edu!pur-ee!pur-phy!sawmill!rjk From: rjk@sawmill.uucp (Richard Kuhns) Newsgroups: comp.unix.questions Subject: a perl question Message-ID: Date: 9 Nov 89 21:29:36 GMT Sender: news@sawmill.UUCP Distribution: comp Organization: Grauel Enterprises, Inc. Lines: 19 I'm not entirely sure that this is the newsgroup I should use, but I've seen a number of perl questions/answers and I don't know of a better newgroup (until comp.lang.perl comes along). My question: I'd dearly love to have a filter, written in perl (the rest of the code for this project is in perl, and I'll post it when I get it working), which would turn the string `B^HBO^HOL^HLD^HD' into `$bold_startBOLD$bold_end', where $bold_start and $bold_end are predefined character strings. I have a filter that does this already written in C, but it seems to me I should be able to do it easier in perl (using regular expressions?), but I can't come up with a good way to do it. /(.)\010$1/ recognizes one element of such a string (always the first). s/(.)\010$1/$1/g specifically does NOT work (it only changes the first occurence). Thanks (in advance, of course). Rich Kuhns newton.physics.purdue.edu!sawmill!rjk