Re: RegularExpressions
- From: Jesse Houwing <jesse.houwing@xxxxxxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 17:07:01 +0000 (UTC)
Hello Jaroslav,
Hi,
is it possible to create regular expression, using c# Regex to:
1. check if the string does NOT contain a word
2. check the same as 1. but for reverse word
Why:
I have to check when the password doesn't contain username nor reverse
username.
Example:
I've username: joe
The password must not contain "joe" nor "eoj".
I know I can use "joe+" regex, but this returns true in case the
string "joe" is present but I need to get false in that case.
Ohh by the way. The 'joe+' regex does indeed match of joe is anywhere in the string, but so would just 'joe' as regex. The + at the end doesn't belong in your expression at all...
--
Jesse Houwing
jesse.houwing at sogeti.nl
.
- References:
- RegularExpressions
- From: Jaroslav Bucek
- RegularExpressions
- Prev by Date: Re: RegularExpressions
- Next by Date: Re: Trying to Play Windows Media Player from C#.NET
- Previous by thread: Re: RegularExpressions
- Next by thread: Re: RegularExpressions
- Index(es):
Relevant Pages
|