zhengyiming
2025-11-14 ba8d1c3083b10e57e9b9f9feb9f192d6f37df1fa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export class MyRegExp {
  static RegUrl = /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w+)*\/?$/;
  static RegUrlWithParameter =
    /((http|ftp|https):\/\/)?[\w\-_]+(\.[\w\-_]+)+([\w\-\\.,@?^=%&:/~\\+#]*[\w\-\\@?^=%&/~\\+#])?/;
 
  static PasswordRegex =
    // eslint-disable-next-line no-useless-escape
    /^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)(?![~`!@#$%\^&*\\|()_\-=+\\、{}\[\]'"<>?.,:;/]+$)[a-zA-Z\d~`!@#$%\^&*\\|()_\-=+\\、{}\[\]'"<>?.,:;/]{6,16}$/;
  static PasswordRegexNoSymbol =
    // eslint-disable-next-line no-useless-escape
    /^(?![\d]+$)(?![a-z]+$)(?![A-Z]+$)[a-zA-Z\d]{6,16}$/;
  static PasswordRegexOnlyLetterNumber =
    // eslint-disable-next-line no-useless-escape
    /^[a-zA-Z0-9]+$/;
}