import { createErrorReporter } from "./error-reporter" ; param { RegExp } rx return { function } export const createRegx = ctx => function regx ( rx ) { const rgx = typeof rx === "function" ? rx ( ctx ) : rx ; return function testRegx ( a , msg ? ) { return createErrorReporter ( "regx" , ctx , msg , [ a , rx ] ) ( ( ) => { return rgx . test ( a ) ; } ) ; } ; } ; export const Email = ( ) => /^([a-zA-Z0-9_\-\.]+)@([a-zA-Z0-9_\-\.]+)\.([a-zA-Z]+)$/ ; export const Xc = ( ) => /(?=.*[^a-zA-Z0-9\s]).*/ ; export const Nc = ( ) => /(?=.*[0-9]).*/ ; export const Lc = ( ) => /(?=.*[a-z]).*/ ; export const Uc = ( ) => /(?=.*[A-Z]).*/ ; export const LUc = ( ) => /(?=.*[a-z])(?=.*[A-Z]).*/ ;