Re: RegularExpressions

Tech-Archive recommends: Fix windows errors by optimizing your registry



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


.



Relevant Pages

  • Re: regex problem unresolved
    ... makes regex fail, I might have already solved half of the problem. ... data file confirmed by search, I believe the fetch program first grabs all ... You have a file 1 from which you read a string, ... the regular expression make it look a bit like that). ...
    (comp.lang.perl.misc)
  • Re: Which RegEx Testing Tool Do You Prefer?
    ... public static string ReplaceAmpersand ... I used both Expresso and Regex Buddy to come up with this. ... > have to force the 2.0 Regular Expression Validator to fail when the & is ... >> create patterns of a large variety of types. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: RegExp to capture IMAGE SRC only.
    ... OBJECT's SRC. ... You will have to define the expected string clearly. ... So you will have to fine tune your regex again and again, ... I put your regular expression in both The Regex Coach, ...
    (comp.lang.javascript)
  • Re: Regular expression question
    ... Your regular expression isn't matching the object string. ... use warnings; ... Changing the regex to this ...
    (perl.beginners)
  • RE: Split question
    ... >>first argument as a regular expression. ... it searches for the null string to split on. ... > The second one is if you include parentheses in your regex. ...
    (perl.beginners)