On Jan 7, Scott said: >At 04:12 PM 1/7/2002 -0500, Jeff 'japhy' Pinyan wrote: >> >>So s/[.-]+//g, or perhaps tr/.-//d; >> >I might have worded it wrong, I need to replace a period (.) and a dash >> >(-), they may not be together ie (.-), they could be in any of the >> >fields in the array. Some of the fields are numbers (5000.00), some are >> >dates (2002-01-07). >> >>Right, and that was what I said, and that is what the code I have posted >>does. > >Thank you Jeff. Works like a charm. One other thing I need to filter >out is [:]'s in a time display 00:00:00. When I added it to the >s/[.-]+//g statement it replaced them with double dashes?
Hrm? I'm not sure I know what you mean -- how could it have replaced them with anything unless you put something on the right-hand side of the s///? Anyway, you want s/[.:-]+//g, or something to that effect. Be warned, though, that [.-:] is NOT what you want, since that means "characters from '.' to '-'", which is the following list: . / 0 1 2 3 4 5 6 7 8 9 : -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ ** Look for "Regular Expressions in Perl" published by Manning, in 2002 ** <stu> what does y/// stand for? <tenderpuss> why, yansliterate of course. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]