At 12:49 -0500 02.02.2001, Kenneth Graves wrote: >From: Uri Guttman <[EMAIL PROTECTED]> >> s/\D+//g ; >> >> tr/0-9//cd ; > >One of those "why did Larry do it that way?" questions: >Why can't I use: > > tr/\d//cd ; > >(I.e., why don't character classes work in tr? \s and \S would be >very convenient.) \d is not a character class, but a metacharacter. And I guess the answer to "why not" is that metacharacters are for regexes, and tr/// does not use regexes. It only looks like it does. -- Chris Nandor [EMAIL PROTECTED] http://pudge.net/ Open Source Development Network [EMAIL PROTECTED] http://osdn.com/
- [Boston.pm] unformatting phone numbers Matthew J. Brooks
- Re: [Boston.pm] unformatting phone numbers Uri Guttman
- Re: [Boston.pm] unformatting phone numbers Matthew J. Brooks
- Re: [Boston.pm] unformatting phone numbers Kenneth Graves
- RE: [Boston.pm] unformatting phone numbers Tolkin, Steve
- Re: [Boston.pm] unformatting phone numbers Chris Nandor
- Re: [Boston.pm] unformatting phone numbers Kenneth Graves
- Re: [Boston.pm] unformatting phone numbers Chris Nandor
- Re: [Boston.pm] unformatting phone numbers Uri Guttman
- Re: [Boston.pm] unformatting phone numbers Ronald J Kimball
- Re: [Boston.pm] unformatting phone numbers Kenneth Graves
- Re: [Boston.pm] unformatting phone numbers Chris Nandor
- Re: [Boston.pm] unformatting phone numbers Elaine -HFB- Ashton
- Re: [Boston.pm] unformatting phone numbers j proctor
- Re: [Boston.pm] unformatting phone numbers Uri Guttman
- Re: [Boston.pm] unformatting phone numbers David H. Adler
