Please bottom post....
> Thanks for the small tutorial - but I must admit that I can only see > (according to your explanation) the regex to be matching anything except > a dot. So substituting them should return only 1 or more dots. Two points here.... 1. + is greedy meaning it keeps matching until it can't, so it is in a sense "gobbling" up characters 2. Add to this the anchor at the beginning of the string, so it is matching anything except a dot and gobbling it up *from the beginning of the string* until it can't match (aka at the first dot). Because it has an empty replacement in the substituition it will replace everything matched, aka all of the characters gobbled up. The key is the anchor. But that > isn't what we get here. You're by saying that the dot in a class is not > a special qualifier. > That really doesn't have much to do with it, and I stand corrected, the \ is not a problem, though it isn't needed either. It would have to be \\ to match a \, but . in character class is not special. > Oh! How I wish I could understand it. :-) I think I need to go back to > learn some more regexs. Two great references: perldoc perlretut perldoc perlre Regexes are a nasty (and powerful) beast, don't hope to conquer them in a day. It takes a special way of thinking, similar to references, once you get them you will get them, until you do they look like black magic (and even after sometimes). I should probably leave the explanations to John or Jenda, their's are usually better. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>