xee

command module
v0.0.0-...-e753662 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 7 Imported by: 0

README

xee

接收重定向管道的输入,处理后再输出

 ~  xee -h
Usage of xee:
  -l	常用正则表达式
  -num int
    	split分割后的第几个元素,开始为0
  -reg string
    	正则表达式,筛选结果符合正则的再输出。常用正则输入-l查看。
  -sep string
    	split分割符 (default " ")


 ~  xee -l
========================= 对重定向结果进行处理后再输出  ==========================
[提取IP] echo "127.0.0.1:8080,127.0.0.1,title" | xee -sep "," -num 1
[正则] echo "{IP:127.0.0.1,Time:xxxxx,Location:xxx}" | xee -sep "," -reg "((?:(?:25[0-5]|2[0-4]\d|[01]?\d?\d)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d?\d))"
============================================================================

ip -> ((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
域名 -> [a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?
url -> http://([w-]+.)+[w-]+(/[w-./?%&=]*)?$
email -> w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*
手机号 -> ((13[0-9])|(14[0-9])|(15[0-9])|(17[0-9])|(18[0-9]))\d{8}$
身份证 -> (\d{15}$)|(^\d{17}([0-9]|X|x)$)
匹配由26个英文字母组成的字符串 -> [A-Za-z]+$
匹配由26个大写英文字母组成的字符串 -> [A-Z]+$
匹配由26个小写英文字母组成的字符串 -> [a-z]+$
匹配由数字和26个英文字母组成的字符串 -> [A-Za-z0-9]+$
匹配正整数 -> [0-9]d*$
 ~ 

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL