Path: utzoo!attcan!uunet!telxon!ping!gorpong From: gorpong@ping.uucp (Gordon C. Galligher) Newsgroups: comp.lang.perl Subject: Re: Need help with (\d+) problem (s/...(\d+)/$1/ not working?) Message-ID: <1990Nov10.160720.7715@ping.uucp> Date: 10 Nov 90 16:07:20 GMT References: <1990Nov4.224658.21882@uvaarpa.Virginia.EDU> Organization: The 23rd. Century Lines: 29 In article <1990Nov4.224658.21882@uvaarpa.Virginia.EDU> telxon!ping!gorpong@uunet.uu.net writes: >Something is a little strange either with the way that I am interpreting the >manual page, or with Perl. The mini-script: [...confusion on \w+ mini-script deleted...] Thank you all very much for your help; as is normally the case you are right and I am stupid. Well, this is another case where TFM and I were not on the same wavelength. Of course the manual states that \w matches a word CHARACTER, not an entire word, and the + just tells it to match more than one word character; and that match would stop when a whitespace character came up. I may have been able to see it if I had really LOOKED at my output. I did not see the fact that "stuff\t95" had been replaced with 95; or I may have saved this group the trouble of this bandwidth. My apologies. 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? (Did you recognize the s/\w+.../$1/ expression Larry? :-) -- Gordon. -- Gordon C. Galligher 9127 Potter Rd. #2E Des. Plaines, Ill. 60016-4881 ...!uunet!telxon!teleng!ping!gorpong