in reply to New to RegEx... need translation

Can I check against all the criteria in one RegEx?

You can, but why? I assume you're vetting potential passwords. Password policies have a way of changing (usually to add new restrictions). Your code will be more maintainable if you have one regex per restriction. Then, when the higher-ups add "passwords can't contain repeated patterns", changing the code will be easier.

Replies are listed 'Best First'.
Re: Re: New to RegEx... need translation
by mojobozo (Monk) on Apr 17, 2003 at 19:31 UTC
    An excellent point, dws, and one I will impliment. And good guess on the need/purpose...
    _____________________________________________________
    mojobozo
    word (wûrd)
    interj. Slang. Used to express approval or an affirmative response to
    something. Sometimes used with up. Source