Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

端口,掩码 路径 #23

Closed
fariellany opened this issue Aug 7, 2019 · 11 comments
Closed

端口,掩码 路径 #23

fariellany opened this issue Aug 7, 2019 · 11 comments

Comments

@fariellany
Copy link

能不能增加一些 端口,子网掩码,还要windows ,linux 路径相关的正则呀

@any86
Copy link
Owner

any86 commented Aug 7, 2019

可以, 我整理下 🐳

@huatten
Copy link
Collaborator

huatten commented Aug 7, 2019

@fariellany 应该是阔以的

@any86 any86 added the 解决中... 我会尽快为大家解决 label Aug 7, 2019
@any86
Copy link
Owner

any86 commented Aug 8, 2019

先把端口号加上, 做个记录

/^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*(?::[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])?\/?$/

@fariellany
Copy link
Author

先把端口号加上, 做个记录

/^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*(?::[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])?\/?$/

这个是端口号??

@any86
Copy link
Owner

any86 commented Aug 8, 2019

先把端口号加上, 做个记录

/^((https?|ftp):\/\/)?([\da-z.-]+)\.([a-z.]{2,6})(\/\w\.-]*)*(?::[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])?\/?$/

这个是端口号??

这个是带端口号的网址, 单独端口号是这个:

/^(?:[1-9]\d{0,3}|[1-5]\d{4}|6[0-4]\d{3}|6[0-5][0-4]\d{2}|6[0-5][0-5][0-2]\d{1}|6[0-5][0-5][0-3][0-5])$/

@any86
Copy link
Owner

any86 commented Aug 8, 2019

@fariellany 但是我不打算单独收录"端口"正则, 网页上只会收录带"端口号的网址"正则

@any86
Copy link
Owner

any86 commented Aug 9, 2019

@fariellany zhe这种匹配数字的正则我写了个函数, 以后可以任意匹配数字了 🐳 稍后我加到页面

image

@any86
Copy link
Owner

any86 commented Aug 9, 2019

刚造完, 想发npm, 发现有人早就做了一个更好的, 哎

https://www.npmjs.com/package/to-regex-range

@any86
Copy link
Owner

any86 commented Aug 9, 2019

来吧帮忙测测, 稳定了就发布到vscode中

@fariellany
Copy link
Author

刚造完, 想发npm, 发现有人早就做了一个更好的, 哎

https://www.npmjs.com/package/to-regex-range

来吧帮忙测测, 稳定了就发布到vscode中

@fariellany zhe这种匹配数字的正则我写了个函数, 以后可以任意匹配数字了 🐳 稍后我加到页面

image

很不错了 大哥 谢谢

@any86
Copy link
Owner

any86 commented Aug 11, 2019

@fariellany 客气 🐳

@any86 any86 closed this as completed Aug 13, 2019
@any86 any86 removed the 解决中... 我会尽快为大家解决 label Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants