BigBug

Carefully Collected Crap

Test Area

Test Area

Misc RegEx

Password
Minimum eight characters, at least one upper case English letter, one lower case English letter, one number and one special character: (From iHateRegex)
(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[!#?@$ %^&*-]).{8,} - Moved '!' to an other place, '!@' is not playing nice in bash.

Minimum eight characters, at least one upper case English letter, one lower case English letter, one number or one special character:
(?=.*?[A-Z])(?=.*?[a-z])((?=.*?[0-9])|(?=.*?[!#?@$ %^&*-])).{8,}

Minimum eight charaters, at least one upper case Danish letter, on lower case Danish letter and one number
(?=.*?[A-ZÆØÅ])(?=.*?[a-zæøå])(?=.*?[0-9]).{8,}

Minimum eight characters, at least one upper case Danish letter, one lower case Danish letter, one number and one special character:
(?=.?[A-ZÆØÅ])(?=.?[a-zæøå])((?=.?[0-9])|(?=.?[!#?@$ %^&*-])).{8,}

Find between (or before or after)
(?<=CN=).*?(?=\,OU) <- Denne marker XXXX i nedenstående linie:
CN=XXXX,OU=BBB,OU=UserAccounts,DC=dk

Find dublicates:
^(.*)(\r?\n\1)+$
Not playing nice with | grep -P

Misc PowersHell

Change password via powershell
Set-ADAccountPassword -Identity USERID -server DOMAIN
Needed: 'RSAT: Active Directory Domain Services and Lightweight Directory Services Tools'
Install: Get-WindowsCapability -Name RSAT.ActiveDirectory* -Online | Add-WindowsCapability -Online
(takes a bit of time)