Re: Valid regular expression not working with validator control
- From: Jesse Houwing <jesse.houwing@xxxxxxxxxxxxxxxx>
- Date: Wed, 5 Mar 2008 11:44:21 +0000 (UTC)
Hello Andrew,
Hi
thanks for the tip. I still can't get what I want to work. I'm using
Expresso to test.
Basically I want to make sure that if an input text includes a certain
domain then validation fails, e.g.
anyone@xxxxxxxxxxxxxxxxxxxxxx fails
anyone@xxxxxxxxxxxxxxxxxx succeeds
Please bear with me as I'm a complete novice with regular expressions.
^[^@]+@(?!not-allowed-domain.com$).*$
should do, though it doesn't check the syntax of the email address itself, it does exclude the domain you want.
Jesse
--
Thanks again
Andrew
"Jesse Houwing" <jesse.houwing@xxxxxxxxxxxxxxxx> wrote in message
news:21effc90464ad8ca4c739989114d@xxxxxxxxxxxxxxxxxxxxx
Hello Andrew,
HiLook behinds are not supported in Client Side code. So you need to
I get a JavaScript error with this expression when using the
RegExpValidator. Also if I switch off client script the server side
code validator finds a match regardless of the entered string.
(?<!@emailaddressnotallowed\.org)$
Is there a way of writing this so it works with the validator in
both client side and server side?
rewrite this to either a full expression or to use a look ahead like
this:
^regexuptothe@(?!emailaddressnotallowed\.org$)restofthedomainregex$
--
Jesse Houwing
jesse.houwing at sogeti.nl
Jesse Houwing
jesse.houwing at sogeti.nl
.
- References:
- Re: Valid regular expression not working with validator control
- From: Andrew Jocelyn
- Re: Valid regular expression not working with validator control
- Prev by Date: Re: Valid regular expression not working with validator control
- Next by Date: Re: REPOST System.Data.DataTable
- Previous by thread: Re: Valid regular expression not working with validator control
- Next by thread: Collection replace in repeater
- Index(es):
Relevant Pages
|