• Stars
    star
    4,492
  • Rank 9,506 (Top 0.2 %)
  • Language Vue
  • Created over 5 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The code for iHateregex.io 😈 - The Regex Cheat Sheet

iHateRegex 😈

PRs Welcome Nodejs CI

don't just use; understand.

iHateRegex.io - a regex cheatsheet for the haters.

Chat with us on Telegram

Features 😎

  • Visual representation of regular expressions
  • Matched strings - the Testing area
  • Embed regular expression visualization on your sites
  • Regex code highlighting and validation
  • Regex description with markdown support
  • Playground page where you can create your own expression and link to it.
  • User login and save regex

Setup πŸš€

  1. Install yarn

  2. Clone this repo

  3. Install dependencies βš™οΈ

$ yarn install
  1. Test on localhost πŸ› 
# serve with hot reload at localhost:3600
$ yarn dev
  1. Build and Start nuxt server πŸš€
# 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.

Contribute Regex πŸ™

Contribute to this project and make this the largest collection of useful expressions 😍

You can also submit regex via this google form

To contribute:

  1. Add your regex to /static/regex/data.json
Show sample 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)
  1. Create a markdown file in /static/regex/markdown/ named <regex-id>.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/<file>.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 πŸ’–

Donate via Opencollective

Credits

  • The visual demo is built with: regexper

More Repositories

1

Git-User-Switch

Switch git user and email with ease
JavaScript
635
star
2

Canvas-Txt

Multiline text on HTML5 Canvas
TypeScript
502
star
3

regex-colorizer

Highlighter for JavaScript regex syntax
JavaScript
45
star
4

Nest-Remixed

Single server NestJS starter with Remix frontend.
TypeScript
12
star
5

QuicMath-Math-Quiz

Never ending math quiz made with Vue
Vue
5
star
6

Chat-Application-Node-Socket-io

A chat application using express and sockets.io
HTML
5
star
7

GST-HSN-Codes-Fetch

Scrape latest GST HSN codes from official website
JavaScript
5
star
8

Pomodoro-timer-react-js

Pomodoro timer in React js
CSS
5
star
9

Flappy-Bird-Phaser3

Flappy Bird clone using Phaser3
JavaScript
4
star
10

Kopp-app-Group-Marathon

Kopp.app helps people progress togather
Vue
4
star
11

Rock-Paper-Scissors-Js

Rock Paper Scissors in js
JavaScript
4
star
12

Warehouse-Inventory-Management

E-commerce platform + Inventory Management in Node JS and MySql
JavaScript
4
star
13

Pure-Bliss-Distraction-Free-Notepad

Pure Bliss! A distraction free notepad to help your creative juice flowing.
JavaScript
4
star
14

Life-in-Weeks

Life in weeks visualization inspired by waitbutwhy
JavaScript
3
star
15

Facebook-Auto-Poster

Autoposter for facebook groups
JavaScript
3
star
16

Final-Project-Server

Flask server that runs the model on the cloud for cnn image models
Python
3
star
17

ML-Lens-character-extracter

Vue
2
star
18

regexper-styled

clone of https://regexper.com
JavaScript
2
star
19

Facebook-Instant-Game-Bot

Messenger bot for instant game
JavaScript
2
star
20

Conway-s-Game-of-Life-with-p5.js

My attempt to make a Conway's game of life using p5.js
JavaScript
2
star
21

Yet-another-Face-extracter

extracts faces (disclaimer: might summon demons)
Python
2
star
22

Canvas-txt-demo-site

Demo Site for Canvas Txt
Vue
2
star
23

react-use-print

Detect and conditionally render for Print in react
TypeScript
2
star
24

Dodge-The-Creeps-Game-GoDot

Dodge The Creeps Game created with godot engine
GDScript
1
star
25

Hyperion-for-Thea

Hyperion, Brother app of Theia
Vue
1
star
26

Bible-Scan

HTML
1
star
27

vue-quotes-app

A quotes application with Vue JS
Vue
1
star
28

platformer-game-godot

godot platformer
GDScript
1
star
29

KSEB-Rate-Calculator-Vue

A simple rate Calculator application for KSEB
Vue
1
star
30

Theia-Scan-Extracter

Extract characters from scanned images
Python
1
star
31

rebuild-earth-nuxt

rebuild earth client in nuxt
Vue
1
star
32

Minimal-HN-React

Minimal Hacker News Reader React
CSS
1
star
33

Youtube-Bulk-Video-downloader

Download multiple Youtube videos using node js
JavaScript
1
star