asp.net - how can I join two regex into one? -
i have 2 regex need join 1 using regularexpressionattribute in asp.net , not allow multiple instances.
how can join following 2 regex one?
.*?@(?!.*?\.\.)[^@]+$ [\x00-\x7f]
the first 1 checks there not 2 consecutive dots in domain part of email , second regex checks characters ascii
i thought might have been easy joining them (.*?@(?!.*?\.\.)[^@]+$)([\x00-\x7f])
not work
here link previous post relating problem
edit: decorating string property of viewmodel using reglarexpression attribute , gets rendered javascript using unobtrusive therefore has validate using javascript. failed mention in initial post
you can use:
^[\x00-\x7f]+?@(?!.*?\.\.)(?=[\x01-\x7f]+$)[^@]+$