Path: utzoo!attcan!uunet!samsung!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.lang.perl Subject: Re: Need help with (\d+) problem (s/...(\d+)/$1/ not working?) Message-ID: <10336@jpl-devvax.JPL.NASA.GOV> Date: 12 Nov 90 19:38:27 GMT References: <1990Nov4.224658.21882@uvaarpa.Virginia.EDU> <1990Nov10.160720.7715@ping.uucp> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 15 In article <1990Nov10.160720.7715@ping.uucp> gorpong@ping.uucp (Gordon C. Galligher) writes: : Just as a quick aside, what I wanted to do was: : REPLACE one or more words followed by one or more whitespace : characters followed by one or more digits : WITH just the digits : Other than changing the s/// to m// and using $1 outside, is there any easy : way to do that from within a =~ expression? Something like: s/(\S+\s+)+(\d+)/$2/g; That's called "thinking positively"... Larry