On 9/15/06, Bart Braem <bart.braem / gmail.com> wrote:
> I'm trying to validate a user mail address for a fixed domain with the rule
> string =~ /\w+\.\w+/
> this matches firstname.lastname, which is what I want.
> But it also matches fistname.lastname / somedomain.com, which is not what I
> want. Why does that match? I'm having this in Rails, but I guess the
> quoting will not escape @ signs?
>
> Bart
>
>

I'm no regex master but what about:
/^[^@]+/

One or more things thats not an '@' at the beginning of the string?

hth,
-Harold