home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.perl
- Path: sparky!uunet!ftpbox!mothost!merlin.dev.cdx.mot.com!fendahl.dev.cdx.mot.com!mcook
- From: mcook@fendahl.dev.cdx.mot.com (Michael Cook)
- Subject: Re: programming challenge
- Message-ID: <mcook.724208660@fendahl.dev.cdx.mot.com>
- Sender: news@merlin.dev.cdx.mot.com (USENET News System)
- Nntp-Posting-Host: fendahl.dev.cdx.mot.com
- Organization: Motorola Codex, Canton, Massachusetts
- References: <1992Dec12.100131.11703@zooid.guild.org>
- Date: Sun, 13 Dec 1992 01:04:20 GMT
- Lines: 33
-
- Mike Stramba <stramba@zooid.guild.org> writes:
-
- >Ok, all you perl wizards out there.
-
- >This out'a be a snap for ya.
-
- > If I have the string :
-
- > Exxxxppppppprrrrrrreeeeesssssiiiiiiiiioooooonnnnnnnnnsssssssss
-
- > and I want to kill the duplicated letters and end up with:
-
- > Expressions
-
- You mean "Expresions", right?
-
- > Lets' see some of your elegant solutions !
-
- > Btw, this problem came up as a result of trying to edit a formatted man
- > page ... for guess what program ? (starts with 'P ... ends with 'l')
-
- > Why am I editing a man page? ... because my computer, an Atari doesn't know
- > about them.
-
- > I'm interested in seeing solutions to the above, anyway.
-
- >Mike
-
- Okay--Here's a non-general solution:
-
- s/x+|p+|r+|e+|s+|i+|o+|n+/substr($&,0,1)/eg
-
- Michael.
-