All Projects → cdoco → Common Regex

cdoco / Common Regex

Licence: mit
🎃 常用正则表达式 - 收集一些在平时项目开发中经常用到的正则表达式。

Projects that are alternatives of or similar to Common Regex

Commonregex
🍫 A collection of common regular expressions for Go
Stars: ✭ 733 (-70.54%)
Mutual labels:  regex, regexp
Emoji Regex
A regular expression to match all Emoji-only symbols as per the Unicode Standard.
Stars: ✭ 1,134 (-54.42%)
Mutual labels:  regex, regexp
Regexr
For composing regular expressions without the need for double-escaping inside strings.
Stars: ✭ 53 (-97.87%)
Mutual labels:  regex, regexp
Grex
A command-line tool and library for generating regular expressions from user-provided test cases
Stars: ✭ 4,847 (+94.82%)
Mutual labels:  regex, regexp
Orchestra
One language to be RegExp's Successor. Visually readable and rich, technically safe and extended, naturally scalable, advanced, and optimized
Stars: ✭ 103 (-95.86%)
Mutual labels:  regex, regexp
Libfsm
DFA regular expression library & friends
Stars: ✭ 512 (-79.42%)
Mutual labels:  regex, regexp
Regex Dos
👮 👊 RegEx Denial of Service (ReDos) Scanner
Stars: ✭ 143 (-94.25%)
Mutual labels:  regex, regexp
Picomatch
Blazing fast and accurate glob matcher written JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
Stars: ✭ 393 (-84.2%)
Mutual labels:  regex, regexp
Regex
An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs.
Stars: ✭ 2,125 (-14.59%)
Mutual labels:  regex, regexp
Youtube Regex
Best YouTube Video ID regex. Online: https://regex101.com/r/rN1qR5/2 and http://regexr.com/3anm9
Stars: ✭ 87 (-96.5%)
Mutual labels:  regex, regexp
Xioc
Extract indicators of compromise from text, including "escaped" ones.
Stars: ✭ 148 (-94.05%)
Mutual labels:  regex, regexp
Learn Regex Zh
🇨🇳 翻译: 学习正则表达式的简单方法
Stars: ✭ 1,772 (-28.78%)
Mutual labels:  regex, regexp
Regulex
🚧 Regular Expression Excited!
Stars: ✭ 4,877 (+96.02%)
Mutual labels:  regex, regexp
Onigmo
Onigmo is a regular expressions library forked from Oniguruma.
Stars: ✭ 536 (-78.46%)
Mutual labels:  regex, regexp
Any Rule
🦕 常用正则大全, 支持web / vscode / idea / Alfred Workflow多平台
Stars: ✭ 5,708 (+129.42%)
Mutual labels:  regex, regexp
Is Glob
If you use globs, this will make your code faster. Returns `true` if the given string looks like a glob pattern or an extglob pattern. This makes it easy to create code that only uses external modules like node-glob when necessary, resulting in much faster code execution and initialization time, and a better user experience. 55+ million downloads.
Stars: ✭ 63 (-97.47%)
Mutual labels:  regex, regexp
Regexp2
A full-featured regex engine in pure Go based on the .NET engine
Stars: ✭ 389 (-84.36%)
Mutual labels:  regex, regexp
Regexparam
A tiny (308B) utility that converts route patterns into RegExp. Limited alternative to `path-to-regexp` 🙇‍♂️
Stars: ✭ 390 (-84.32%)
Mutual labels:  regex, regexp
Hyperscan Java
Match tens of thousands of regular expressions within milliseconds - Java bindings for Intel's hyperscan 5
Stars: ✭ 66 (-97.35%)
Mutual labels:  regex, regexp
Proposal Regexp Unicode Property Escapes
Proposal to add Unicode property escapes `\p{…}` and `\P{…}` to regular expressions in ECMAScript.
Stars: ✭ 112 (-95.5%)
Mutual labels:  regex, regexp

目录

邮箱

[email protected] 只允许英文字母、数字、下划线、英文句号、以及中划线组成

^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$

email

高子航[email protected] 名称允许汉字、字母、数字,域名只允许英文域名

^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$

email

电话

13012345678 手机号

^1(3|4|5|6|7|8|9)\d{9}$

phone

XXX-XXXXXXX XXXX-XXXXXXXX 固定电话

(\(\d{3,4}\)|\d{3,4}-|\s)?\d{8}

email

域名

https://google.com/

^((http:\/\/)|(https:\/\/))?([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}(\/)

domain-name

IP

127.0.0.1

((?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d))

ip

帐号校验

gaozihang_001 字母开头,允许5-16字节,允许字母数字下划线

^[a-zA-Z][a-zA-Z0-9_]{4,15}$

user

字符校验

汉字

高子航

^[\u4e00-\u9fa5]{0,}$

chinese

英文和数字

^[A-Za-z0-9]+$

char

长度为3-20的所有字符

^.{3,20}$

char

英文字符

由26个英文字母组成的字符串

^[A-Za-z]+$

char

由26个大写英文字母组成的字符串

^[A-Z]+$

char

由26个小写英文字母组成的字符串

^[a-z]+$

char

由数字和26个英文字母组成的字符串

^[A-Za-z0-9]+$

char

由数字、26个英文字母或者下划线组成的字符串

^\w+$

char

中文、英文、数字包括下划线

^[\u4E00-\u9FA5A-Za-z0-9_]+$

char

中文、英文、数字但不包括下划线等符号

^[\u4E00-\u9FA5A-Za-z0-9]+$

char

禁止输入含有%&',;=?$"等字符

[^%&',;=?$\x22]+

char

禁止输入含有~的字符

[^~\x22]+

char

数字正则

整数

^-?[1-9]\d*$

num

正整数

^[1-9]\d*$

num

负整数

^-[1-9]\d*$

num

非负整数

^[1-9]\d*|0$

num

非正整数

^-[1-9]\d*|0$

num

浮点数

^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$

num

正浮点数

^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$

num

负浮点数

^-([1-9]\d*\.\d*|0\.\d*[1-9]\d*)$

num

非负浮点数

^[1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0$

num

非正浮点数

^(-([1-9]\d*\.\d*|0\.\d*[1-9]\d*))|0?\.0+|0$

num

License

MIT License. See the LICENSE file.

top

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].