当前位置:网站首页>regular expression
regular expression
2022-06-24 21:07:00 【AcTarjan】
Regular expression online test
Common regular expressions
- IPv4 check
^((2(5[0-5]|[0-4]\d))|[0-1]?\d{
1,2})(\.((2(5[0-5]|[0-4]\d))|[0-1]?\d{
1,2})){
3}$
- IPv6 check
^\s*((([0-9A-Fa-f]{
1,4}:){
7}([0-9A-Fa-f]{
1,4}|:))|(([0-9A-Fa-f]{
1,4}:){
6}(:[0-9A-Fa-f]{
1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3})|:))|(([0-9A-Fa-f]{
1,4}:){
5}(((:[0-9A-Fa-f]{
1,4}){
1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3})|:))|(([0-9A-Fa-f]{
1,4}:){
4}(((:[0-9A-Fa-f]{
1,4}){
1,3})|((:[0-9A-Fa-f]{
1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3}))|:))|(([0-9A-Fa-f]{
1,4}:){
3}(((:[0-9A-Fa-f]{
1,4}){
1,4})|((:[0-9A-Fa-f]{
1,4}){
0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3}))|:))|(([0-9A-Fa-f]{
1,4}:){
2}(((:[0-9A-Fa-f]{
1,4}){
1,5})|((:[0-9A-Fa-f]{
1,4}){
0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3}))|:))|(([0-9A-Fa-f]{
1,4}:){
1}(((:[0-9A-Fa-f]{
1,4}){
1,6})|((:[0-9A-Fa-f]{
1,4}){
0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3}))|:))|(:(((:[0-9A-Fa-f]{
1,4}){
1,7})|((:[0-9A-Fa-f]{
1,4}){
0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){
3}))|:)))(%.+)?\s*$
Can match IPV6 Address
fe80:0000:0000:0000:0204:61ff:fe9d:f156 // full form of IPv6
fe80:0:0:0:204:61ff:fe9d:f156 // drop leading zeroes
fe80::204:61ff:fe9d:f156 // collapse multiple zeroes to :: in the IPv6 address
fe80:0000:0000:0000:0204:61ff:254.157.241.86 // IPv4 dotted quad at the end
fe80:0:0:0:0204:61ff:254.157.241.86 // drop leading zeroes, IPv4 dotted quad at the end
fe80::204:61ff:254.157.241.86 // dotted quad at the end, multiple zeroes collapsed
::1 // localhost
fe80:: // link-local prefix
2001:: // global unicast prefix
边栏推荐
- Background of master data construction
- Format method and parse method of dateformat class
- Web automation: summary of special scenario processing methods
- Smooth live broadcast | analysis of key technologies for live broadcast pain points
- yeb_ Back first day
- Learn together and make progress together. Welcome to exchange
- Enjoy yuan mode -- a large number of flying dragons
- Mr. Hu Bo, CIO of weiduomei, a scientific innovator: digitalization is a bloodless revolution, and the correct answer lies in the field of business
- Simpledateformat thread unsafe
- 基于QT+MySQL的相机租赁管理系统
猜你喜欢

Appium desktop introduction

Combination mode -- stock speculation has been cut into leeks? Come and try this investment strategy!

Image panr

Agency mode -- Jiangnan leather shoes factory

Shrimp skin test surface treated

Static routing job

Wechat applet custom tabbar

Several common command operations in win system

Freshman girls' nonsense programming is popular! Those who understand programming are tied with Q after reading

A/B测试助力游戏业务增长
随机推荐
Wechat applet custom tabbar
Basic properties and ergodicity of binary tree
Comprehensive comparison of the most popular packet capturing tools in the whole network
A/b test helps the growth of game business
Network security review office starts network security review on HowNet
What are the problems with traditional IO? Why is zero copy introduced?
Basic concepts and definitions of Graphs
使用gorm查询数据库时reflect: reflect.flag.mustBeAssignable using unaddressable value
Static routing job supplement
VIM usage
Visitor model -- generation gap between young and middle-aged people
Requests requests for web page garbled code resolution
Grating diffraction
How to enhance influence
Camera rental management system based on qt+mysql
得物多活架构设计之路由服务设计
Prototype mode -- clone monster Army
Builder mode -- Master asked me to refine pills
Rip/ospf protocol notes sorting
Bridging mode -- law firm