[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
regex question
i'd like to test to see if a variable has two \@ symbols, and i am
struggling with the best way to do so. i am sure the format of the string
will be
foo@bar.com foo@baz.com
where the empty space between the two addresses could be any one or two
characters. so far, i have come up with
/^(\w)+\@(\w)+\.(\w)+(.|..)(\w)+/@/
but i am not certain if this is very efficient. i only test up to the
second @ in my regex which i think is sufficient to verify whether or not
the string has two @ symbols
is there a better way to do this?
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.