Have fun with regular! Recommend a quick check, debugging, verification, visualization tool

Have fun with regular!  Recommend a quick check, debugging, verification, visualization tool
As a programmer and a code farmer, you will need to write regular expressions from time to time. However, regular expressions are not a language after all. Not all programmers know, or are very proficient. Sometimes, you will encounter very weird regular expressions, which you may not be able to write, and the boss is still in a hurry! The project can't do without your regular expression.

At this time, you will definitely scratch your head and think, if there is a tool that can generate regular expressions through conditions, it would be great! In the world of programmers, wherever there is demand, there is development. No, there is really such an amazing tool: iHateRegex.

Have fun with regular!  Recommend a quick check, debugging, verification, visualization tool

github地址:https://github.com/geongeorge/i-hate-regex

i Hate Regex is an online open source tool that can quickly retrieve and match appropriate regular expressions to help you complete the verification of common rules such as username, email, date, mobile phone number, and password.

It has the following characteristics:

  • Visual regular expression

  • Matched string-test area

  • Embed regular expression visualization on your website

  • Regular expression code highlighting and verification

  • Description of regular expressions that support markdown

  • On the Playground page, you can create your own expression and link to it.

  • The user logs in and saves the regular expression

How to access and use

It has two ways to access and use: 1. online, 2. local installation

1. Online visit directly visit https://ihateregex.io/

2. Local installation

#安装 yarn (已安装的可以忽略)
npm install -g yarn

#克隆仓库
git clone https://github.com/geongeorge/i-hate-regex.git

#安装依赖
yarn install

#在本地测试
yarn dev

#打包并运行nuxt服务器
yarn build

yarn start

这个项目是用Nuxt.js打包。更详细的信息可以参考Nuxt.js文档

The migrant worker suggested that it is more convenient and practical to use the online method. After all, the source code installation also involves the use of many frameworks, and there is no need to spend this kind of learning cost.

Use screenshots

Click the playground below on the homepage to enter the page:

Have fun with regular!  Recommend a quick check, debugging, verification, visualization tool

Here, we can see the corresponding regular expression and the schematic diagram of the matching process.

Here we can also modify the regular expression, and the corresponding diagram will also change accordingly

Have fun with regular!  Recommend a quick check, debugging, verification, visualization tool

In addition, you can search for the regular expression
Have fun with regular!  Recommend a quick check, debugging, verification, visualization tool
you want at the top of the navigation bar on the left side of the page. Here we enter the IP and click the first one (ip address(ipv4))

Have fun with regular!  Recommend a quick check, debugging, verification, visualization tool

It is very convenient and practical, and it must be enough for daily work.

Interested readers can try and explore by themselves. At the same time, if you think this gadget is very good and practical, please click to see and share it, so that more people can use it to improve work efficiency. .

Readers and friends are also welcome to leave a message to share the useful gadgets you have used.

end

Guess you like

Origin blog.51cto.com/15127557/2665125