in reply to New to RegEx... need translation
In several regexps it could be
as just one regexp you could useif (/[A-Z]/ and /[a-z]/ and /[0-9]/ and /[;,.#!\$]/) { ...
|
Update: Another option without using the positive look-aheads would be:
If you want to know how did I get to that code: You can read the regexp as "the string is either all non-capitals or all non-lowercase leters or non-digits or non-specials". |
Jenda
Always code as if the guy who ends up maintaining your code
will be a violent psychopath who knows where you live.
-- Rick Osborne
Edit by castaway: Closed small tag in signature
|
|---|