UNPKG

pixiu-number-toolkit

Version:
186 lines (183 loc) 4.87 kB
import { R as RegexOptions } from '../common.d-B6RfkedC.js'; declare const THOUSAND_SEPARATOR_REGEX: RegExp; declare const TRIM_NON_NUMERIC_REGEX: RegExp; declare const ZERO_DOT_END_REGEX: RegExp; declare const EMPTY_START_REGEX: RegExp; declare const ZERO_YUAN_REGEX: RegExp; declare const ZERO_DOT_PLUS_REGEX: RegExp; declare const WHOLE_REGEX: RegExp; declare const REGEX: { /** * a thousand separated number(千分位数字) */ THOUSAND_SEPARATED_NUMBER: RegExp; /** * Numeric/currency amount (supports negative numbers, thousand separators) * 数字/货币金额(支持负数、千分位分隔符) */ NUMBER_CURRENCY: RegExp; /** * number(数字) */ NUMBER: RegExp; /** * integer(整数) */ INTEGER: RegExp; /** * positive integer(正整数) */ POSITIVE_INTEGER: RegExp; /** * negative integer(负整数) */ NEGATIVE_INTEGER: RegExp; /** * non-positive integer(非正整数) */ NON_POSITIVE_INTEGER: RegExp; /** * float(浮点数) */ FLOAT: RegExp; /** * positive float(正浮点数) */ POSITIVE_FLOAT: RegExp; /** * negative float(负浮点数) */ NEGATIVE_FLOAT: RegExp; /** * non-positive float(非正浮点数) */ NON_POSITIVE_FLOAT: RegExp; /** * non-negative float(非负浮点数) */ NON_NEGATIVE_FLOAT: RegExp; /** * chinese postal code(中国邮政编码) */ CHINESE_POSTAL_CODE: RegExp; /** * chinese mobile(中国手机号) */ CHINESE_MOBILE: RegExp; /** * chinese tel(中国固话号码) */ CHINESE_TEL: RegExp; /** * chinese bank card(中国银行卡号) */ CHINESE_BANK_CARD: RegExp; /** * chinese tax number(中国税号) */ CHINESE_TAX_NUMBER: RegExp; /** * decimal number (supports scientific notation) * 十进制数(支持科学记数法) */ DECIMAL_SCIENTIFIC_NOTATION: RegExp; /** * blank string(空白字符串) */ BLANK: RegExp; /** * non-special characters(非特殊字符) */ NON_SPECIAL_CHARACTERS: RegExp; EMOJI: RegExp; EMAIL: RegExp; /** * ip address(IP网址) */ IP_ADDRESS: RegExp; IPV4: RegExp; /** * subnet mask(子网掩码) */ SUBNET_MASK: RegExp; /** * mac address(mac地址) */ MAC_ADDRESS: RegExp; URL: RegExp; /** * simplified chinese(简体中文) */ CHINESE: RegExp; /** * chinese name(中文姓名) */ CHINESE_NAME: RegExp; /** * chinese id card 1G(中国身份证号1代) */ CHINESE_ID_CARD_1: RegExp; /** * chinese id card 2G(中国身份证号2代) */ CHINESE_ID_CARD_2: RegExp; /** * chinese id card(中国身份证号) */ CHINESE_ID_CARD: RegExp; /** * Unified Social Credit Identifier (统一社会信用代码) */ UNIFIED_SOCIAL_CREDIT_IDENTIFIER: RegExp; /** * loose unified social credit identifier(宽松统一社会信用代码) */ LOOSE_UNIFIED_SOCIAL_CREDIT_IDENTIFIER: RegExp; /** * New energy vehicle license plate(新能源车牌号) */ NEW_ENERGY_LICENSE_PLATE: RegExp; /** * Non-new energy vehicle license plate(非新能源车牌号) */ NON_NEW_ENERGY_LICENSE_PLATE: RegExp; /** * Combined, for both new energy and non-new energy vehicle license plates(联合新能源和非新能源车牌号) */ COMBINED_LICENSE_PLATE: RegExp; /** * starts with a letter, allows 5-16 bytes, * allows combination of letters, numbers, and underscores * 以字母开头,允许5-16个字节, * 允许字母、数字和下划线组合 */ ACCOUNT: RegExp; /** * chinese characters(中文字符,包括繁体) */ CHINESE_CHARACTERS: RegExp; /** * hexadecimal color(十六进制颜色#cf0cf0) */ HEX_COLOR: RegExp; /** * english letters(英文字母) */ ENGLISH_LETTER: RegExp; /** * lower case english letters(小写英文字母) */ LOWERCASE_ENGLISH_LETTER: RegExp; /** * upper case english letters(大写英文字母) */ UPPERCASE_ENGLISH_LETTER: RegExp; }; /** * dynamically build regex(动态构建正则表达式) * @param baseRegex - regex(正则表达式) * @param options - 选项对象,包含是否全字符串匹配、是否全局搜索等选项 * @return 返回构建的正则表达式 */ declare function buildRegex(baseRegex: RegExp, options?: RegexOptions): RegExp; export { EMPTY_START_REGEX, REGEX, THOUSAND_SEPARATOR_REGEX, TRIM_NON_NUMERIC_REGEX, WHOLE_REGEX, ZERO_DOT_END_REGEX, ZERO_DOT_PLUS_REGEX, ZERO_YUAN_REGEX, buildRegex };