From: Alex LeDonne Date: 2006-09-18T23:26:07+09:00 Subject: Re: Regular expression for string.anotherstring On 9/17/06, Bart Braem wrote: > Paul Lutus wrote: > > > I think you want this: "string.string", but you don't want this: > > "string.string@domain". Yes? > > > That's right. > > > > Have you tried: > > > > string =~ /^\w+\.\w+$/ > > > > "^" means match at the beginning of the string, "$" means match at the > > end. IOW the example must match the entire string. Is this what you > > wanted? > > That's a good suggestion, I'll give it a shot. > One question though: why does \w match with '@'? According to the > documentation \w == [a..zA..Z]?? > > Bart Bart- Maybe I'm off base here, but are you trying to determine if a string matches a pattern, or are you trying to capture a matching substring from a string? -Alex