Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geongeorge/i-hate-regex
The code for iHateregex.io ๐ - The Regex Cheat Sheet
https://github.com/geongeorge/i-hate-regex
nuxt regex tailwindcss vue
Last synced: 7 days ago
JSON representation
The code for iHateregex.io ๐ - The Regex Cheat Sheet
- Host: GitHub
- URL: https://github.com/geongeorge/i-hate-regex
- Owner: geongeorge
- Created: 2019-08-03T02:42:32.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-27T10:58:07.000Z (about 1 year ago)
- Last Synced: 2024-10-29T15:17:43.374Z (2 months ago)
- Topics: nuxt, regex, tailwindcss, vue
- Language: Vue
- Homepage: https://iHateRegex.io
- Size: 7.46 MB
- Stars: 4,497
- Watchers: 49
- Forks: 319
- Open Issues: 37
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- Awesome-GitHub-Repo - i-hate-regex - ๆญฃๅ่กจ่พพๅผ็ๅฏ่งๅ่กจ็คบใ[<img src="https://tva1.sinaimg.cn/large/008i3skNly1gxlhtmg11mj305k05k746.jpg" alt="ๅพฎไฟก" width="18px" height="18px" />](https://mp.weixin.qq.com/s?__biz=MzUxNjg4NDEzNA%3D%3D&chksm=f9a229a1ced5a0b75b8cf784306e502530c1a6229371c4c99ecdf9ea89a04bfb65cf1c2ac347&idx=1&mid=2247498344&scene=21&sn=764f8b7c5ab7336d0161ff3fee27c56f#wechat_redirect) (ๅฎๆ้กน็ฎ / Vueๅฎๆ้กน็ฎ)
- awesome-list - iHateRegex - The code for iHateregex.io - The Regex Cheat Sheet (Programming Language Tutorials / For Scala)
- my-awesome - geongeorge/i-hate-regex - 12 star:4.5k fork:0.3k The code for iHateregex.io ๐ - The Regex Cheat Sheet (Vue)
- awesome-starred - geongeorge/i-hate-regex - The code for iHateregex.io ๐ - The Regex Cheat Sheet (vue)
README
iHateRegex ๐
don't just use; understand.
iHateRegex.io - a regex cheatsheet for the haters.
Chat with us on Telegram## Features ๐
- [x] Visual representation of regular expressions
- [x] Matched strings - the Testing area
- [x] Embed regular expression visualization on your sites
- [x] Regex code highlighting and validation
- [x] Regex description with markdown support
- [ ] [Playground page](https://ihateregex.io/playground) where you can create your own expression and link to it.
- [ ] User login and save regex## Setup ๐
1. Install [yarn](https://yarnpkg.com/)
2. [Clone](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) this repo
3. Install dependencies โ๏ธ
``` bash
$ yarn install```
4. Test on localhost ๐
``` bash
# serve with hot reload at localhost:3600
$ yarn dev
```
5. Build and Start nuxt server ๐
``` bash
# build for production and launch server
$ yarn build
$ yarn start
```This project is built with Nuxt.js ๐
For detailed explanation on how things work, check out [Nuxt.js docs](https://nuxtjs.org).
## Contribute Regex ๐
Contribute to this project and make this the largest collection of useful expressions ๐
You can also submit regex via this [google form](https://forms.gle/Cwo3VupujQJzeoYQ9)
### To contribute:
1. Add your regex to `/static/regex/data.json`
Show sample JSON
```json
{
"id": "username",
"title": "username",
"tagline": "match a username",
"description": "Alphanumeric string that may include _ and - having a length of 3 to 16 characters.",
"regex": "^[a-z0-9_-]{3,15}$",
"flag": "gm",
"matchText": [
"lorem",
"ipsum",
"gr3at",
"a",
"ab",
"abcd",
"abcde",
"john doe",
"johnny",
"abcdefghijklmnopqrst"
],
"cheatRegex": [
"/^/",
"/$/",
"/[a-zA-Z0-9]/",
"/(hello){1,3}/"
],
"embedHeight": 300,
"tags" : ["name", "slug"]
},
```Show JSON properties
| Property | Definition |
|------|------------|
| id| this is the slug and also the short name of the regex. cannot contain spaces and only contain url-safe characters|
| title | Title of the page. |
| tagline | Tagline |
| description | First line under the tagline and also the meta description |
| regex | The actual regex string |
| flag | regex flags associated with the expression. eg; g |
| matchText | Array(line by line) of strings to be included in the string matching are |
| cheatRegex | refer `static/regex/cheatsheet.json` and see what all cheats are relevent to this expression. (you can also add your own cheats into cheatsheet.json and refer to that) |
| embedHeight | Height in pixels of the regex visualization embed |
| tags | tags related to the expression (to be used later) |2. Create a markdown file in `/static/regex/markdown/` named `.md` for longer description and explanation
*<regex-id> is the **id** from **data.json***
That's it ๐ Go ahead and shoot a new pull requestโจโจ
### Descriptions
There are 2 descriptions for each regex.
- One is the **description** property inside `/static/regex/data.json`.
- This is used for page **meta description** as well.
- This is the **first description**- Second is a dedicated **markdown file** in `/static/regex/markdown/.md`
- This should explain how the expression works in detail.
- This is the **long description**
| Property | Definition | example |
|------|------------|------------|
| **description** property inside `data.json` | This should explain about what the target match is in a few lines. It should not contain any html or markdown |A username is a unique identifier given to accounts in websites and social media |
|dedicated **markdown file**|Explain about the expression and how it works| ip addresses are of the range 0.0.0.0 - 255.255.255.255. The expression matches the ....(more)|## Sponsors ๐
## Credits
- The visual demo is built with: [regexper](https://gitlab.com/javallone/regexper-static
)