54 lines
1.2 KiB
Plaintext
54 lines
1.2 KiB
Plaintext
=!RegEXP=
|
|
|
|
==Password policy==
|
|
|
|
at least
|
|
* lower-case alphabetic character: [a-z]
|
|
* upper-case alphabetic character: [A-Z]
|
|
* decimal digit: [0-9]
|
|
* one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
|
|
|
|
and 8 chars long
|
|
|
|
{{{class="brush: bash; toolbar: false;"
|
|
(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\p{Punct})\\p{Graph}{8}
|
|
}}}
|
|
|
|
|
|
Example:
|
|
|
|
{{{class="brush: java; toolbar: false;"
|
|
import java.sql.SQLException;
|
|
import java.util.regex.Pattern;
|
|
import java.util.regex.Matcher;
|
|
|
|
public class reg {
|
|
|
|
/**
|
|
* @param args
|
|
* @throws SQLException
|
|
* @throws ClassNotFoundException
|
|
*/
|
|
public static void main(String[] args) throws SQLException, ClassNotFoundException {
|
|
Pattern p = Pattern.compile("(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*\\p{Punct})\\p{Graph}{8}");
|
|
Matcher m = p.matcher("13a!56A2");
|
|
boolean b = m.matches();
|
|
System.out.println(b)
|
|
}
|
|
}
|
|
}}}
|
|
|
|
==Delete foo==
|
|
|
|
lösche jede Zeile, welche eine Fileendung enhällt
|
|
{{{class="brush: bash; toolbar: false;"
|
|
(.*?)\.(.*)$
|
|
}}}
|
|
|
|
das gleiche nur im Vim
|
|
{{{class="brush: bash; toolbar: false;"
|
|
:g/\.\(.*\)$/d
|
|
}}}
|
|
|
|
[ [[index|Go home]] ]
|