npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

lbb-zhenzhe

v1.2.0

Published

```js 手机号 /^1[3-9]\d{9}$/ 邮箱 /^\w+@\w+\.(com|cn|net)$/ 密码 /^[a-zA-Z].{5,7]$/ /^[\w\*\?\$\.]{6,18}$/i; ///密码 var pads1 = /\d/;//弱 var pads2 = /[a-z]/i;//中 var pads3 = /[\*\?\$\&_\.]/;//强 +++++++++++++++++++++

Readme

#正则

手机号 /^1[3-9]\d{9}$/
邮箱  /^\w+@\w+\.(com|cn|net)$/
密码  /^[a-zA-Z].{5,7]$/
/^[\w\*\?\$\.]{6,18}$/i; ///密码
var pads1 = /\d/;//弱
var pads2 = /[a-z]/i;//中
var pads3 = /[\*\?\$\&_\.]/;//强
+++++++++++++++++++++


1.修饰符
i	忽略大小写
g	全局匹配
m	多行匹配

2.元字符
\d	匹配数字
\D	匹配非数字
\w	匹配数字字母下划线
\W	匹配非数字字母下划线
\s	匹配空字符
\S	匹配非空字符
\b	匹配单词边界
\B	匹配非单词边界
[\u4e00-\u9fa5]	匹配中文

3.特殊字符
[]	中括号中的字符匹配任意一个
^	以什么开始
$	以什么结束
[^]	取反,除了中括号里以外的字符
.	除了换行以外的任意字符
|	或
()	分组

4.限定符
{n,m}	匹配n-m个
{n}	匹配n个
{n,}	最少匹配n个
+	一个或多个,相当于{1,}
*	0个或多个,相当于{0,}
?	0个或一个,相当于{0,1}

七、常用正则总结
1.	手机号正则
手机号以数字1开头
第二位不能是0、1、2
后9位任意数字
/^1[3-9]\d{9}$/
2.	邮箱正则
开头可以多个是数字字母下划线
中间有@符
@符后也是多个数字字母下划线
接着匹配 .
后面跟常见尾缀
/^\w+@\w+\.(com|cn|net)$/
3.	不能是纯数字、不能是纯字母
至少得匹配一个非数字  /\D/
至少得匹配一个非字母  /\[a-zA-Z]/
同时满足两个正则
4.	去除开头结尾空格
开头匹配空格1个或多个
结尾匹配空格1个或多个
任意一个条件满足,加上全局匹配即可
/^\s+|\s+$/