Fiddles by Paul Alexander
- 1RevisionsForks
Locally managed MAC address
.[26ae](:.{2}){5}#+ f2:6f:c1:bc:82:f5 #- f4:db:e3:d1:c2:77 - 7RevisionsForks
Allowed Domain Patterns
/^(?>[a-zA-Z0-9\*][a-zA-Z0-9\-\*]*\.?)+([a-zA-Z*]+)$/#+ google.com *.google.com google.com *.youtube.com sites.google.com whitehouse.gov whitehouse.gov*user i-have-a-hyphen.co schools-blocked.s3-website-us-east-1.amazonaws.com complex*.patt*.match ipv4-c041-atl003-ix.1.oca.nflxvideo.net *.1.oca.nflxvideo.net #- gopher://anything.com http://anything.com www.bad_names.com name.with.path/aaa name-with.query?is-bad=true no-hashtags.allowed#sad schools-blocked.s3-website-us-east-1.amazonaws.com/ - 12RevisionsForks
Allowed URL Patterns
/^((http|https|ftp):\/\/)?(?>(([a-zA-Z0-9\-\*]+\.)*([a-zA-Z0-9\-\*]+))|(([0-9]{1,3}\.){3}[0-9]{1,3})|(\[([0-9a-zA-Z]{0,4}:){1,8}[0-9a-zA-Z]{0,4}\]))(:[0-9]{1,5})?((\/[^\/]*)+)?(\?.*)?(#.*)?$/g#+ google.com *.google.com google.com/* http://google.com/* *.youtube.com http://simple.com sites.google.com/*game* *.youtube.com/playlist=1234* *.youtube.com?playlist=1234* whitehouse.gov#terms* whitehouse.gov/*user whitehouse.gov*user i-have-a-hyphen.co sites.google.com/site/unblockedgamesgold/ 10.10.230.215 [2001:db8:3df5:2a76:23f6:7300:0000:356a] [2001:db8:0:0:de52:32fd::] *crazygames-unblocked* 10.0.8.16:8080 ipv4-c041-atl003-ix.1.oca.nflxvideo.net *.1.oca.nflxvideo.net #- gopher://anything.com www.bad_names.com - 1RevisionsForks
Extract origin from URL
/^https?:\/\/[^\/]+($|\/)/#+ https://www.bark.us https://connect.bark.us https://connect.bark.us/c/category #- https://www.google.com https://www.bark.us.bad.guy http://www.bark.us http://badguy.com/https://www.bark.us - 5RevisionsForks
Match react component stack trace
^\s*in\s+(?<className>.+?)(\s+\(at\s+(?<fileName>.+?):(?<lineNumber>\d+?)\))?$#+ in LoadingScreen in LoadingScreen (at LoadingView.js:105) in ErrorBoundary (at LoadingView.js:104) in LoadingView (at RoutingView.js:17) in RoutingView (at App.js:31) in Provider (at App.js:30) in RCTView (at View.js:35) in View (at App.js:29) in App (at renderApplication.js:40) in RCTView (at View.js:35) in View (at AppContainer.js:98) in RCTView (at View.js:35) in View (at AppContainer.js:115) in AppContainer (at renderApplication.js:39)`, - 2RevisionsForks
Match external script tags
/<script/<!DOCTYPE html> <html lang='en'> <head id='global_header'> <meta charset='utf-8'> <meta content='IE=Edge,chrome=1' http-equiv='X-UA-Compatible'> <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0' name='viewport'> <meta content='Niche is the professional network for social media creators to analyze, grow and monetize their audience.' name='description'> <meta content='social media creators, influencer marketing, instagram ranking, vine ranking, instagram advertising, vine advertising' name='keywords'> <meta content='DEVELOPM' name='revision'> <meta content='development' name='env'> <title>Niche | All the world's creators, in one place</title> <link href='/apple-touch-icon.png' rel='apple-touch-icon'> <link href='/apple-touch-icon-120x120.png' rel='apple-touch-icon' sizes='120x120'> <link href='/apple-touch-icon-76x76.png' rel='apple-touch-icon' sizes='76x76'> <link href='/apple-touch-icon-152x152.png' rel='apple-touch-icon' sizes='152x152'> <link href='/favicon.ico' rel='shortcut icon'> <link href='/favicon.png' rel='icon' sizes='192x192'> <meta name="csrf-param" content="authenticity_token" /> <meta name="csrf-token" content="KQDQAl1w+EVwAnDhANrwu9hmRrXVPvvx5ZfDcS4eRBuNd+5mgVGMZcnFy+p/Yi78R/M6S65fbGzVBj/BLvu/Dw==" /> <link rel="stylesheet" media="all" href="/assets/application-d486595641e866d34e7a213ba0eacf2c8e7a6bedbb6208a808e5483839229198.css" /> <script src="/assets/modernizr-654222debe8018b12f1993ceddff30dc163a7d5008d79869c399d6d167321f97.js"></script> <script src="/assets/startup-8c3415896526a65a33f20bbfe1d34c6bab3fdf5e55eaf439a6ab5795e6c38f00.js"></script> <script src="/assets/conversion_tracking-d2c28e539fd9060823b53cd121fa9ac85eaa1bc01d59c1e9cf9f909e390a0ee9.js"></script> </head> <body class='basic'> <div id='content'> <div class='container'> <div class='flashes'> </div> </div> <div class='container'> <form class="simple_form nform user edit_user " id="edit_user_2058" novalidate="novalidate" action="/auth/elevate" accept-charset="UTF-8" method="post"><input name="utf8" type="hidden" value="✓" /><input type="hidden" name="authenticity_token" value="tVzga1SCC0Z36n5Y5kvSPFAmaD55rzINiGcmc8/lUrARK94PiKN/Zs4txVOZ8wx7z7MUwALOpZC49trDzwCppA==" /> <div class="npanel npanel_flat npanel_modal "><div class="npanel_heading "><h3 class="npanel_title ">Confirm password</h3></div><div class="npanel_body"><input type="hidden" name="return_to" id="return_to" value="/users/phallguy/roles" /> <div class='nform-unlabeled'> <div class="nform-group form-group password optional user_password"><input class="password optional nform-control" autofocus="autofocus" placeholder="Password..." autocomplete="off" type="password" name="user[password]" id="user_password" /></div> </div> <p> You're trying to access an important resource. Please confirm your password. We won't ask again for a little while. </p> </div><div class="npanel_footer "><input type="submit" name="commit" value="Confirm Password" class="btn btn-primary" id="login-btn" /> </div></div> </form> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js"></script> <script src="/assets/jquery_fallback-083befa7d646ae73c7606bd0ff0390e083d527cf66634f13ad0d8b52689a069e.js"></script> <script src="/assets/application-f8ff8b77171b225cd046563d0c24d3b630e94bac233f540dcab2cd6338d20b2e.js"></script> <div class='icon-preloader'></div> </body> </html> - 1RevisionsForks
58d91f3f75622d0157010000
/[\/]\.(git|hg|svn)|node_modules/#+ /.git /.hg /.svn /node_modules - 2RevisionsForks
MIME wildcard matcher
/.+\/.+|\*/#+ .* image/.* application/pdf image/jpeg #- video - 1RevisionsForks
Extract url query params
/\?([^?]*)$/gmhttp://localhost/?name=?a http://localhost/?name=example - 1RevisionsForks
Related JSON pointer
/^\/([^\/]*)_ids?$/#+ /publisher_id /campaign_id #- /metrics/stat_id - 2RevisionsForks
ID attribute -> relationships pattern
/^(?<name>[^.]*)_id$/g#+ campaign_id #- audience.age_id - 1RevisionsForks
56c5df1e75622d3d79332e00
/k[^\s]*s/gParameters: {"utf8"=>"✓", "authenticity_token"=>"[FILTERED]", "campaigns_campaign"=>{"name"=>"", "summary"=>"", "budget"=>"", "client_id"=>"", "audience"=>{"ages"=>["", "", "", "", "", ""]}, "objectives"=>{"networks"=>{"facebook"=>{"targeted"=>"0", "posts_count"=>""}, "twitter"=>{"targeted"=>"0", "posts_count"=>""}, "instagram"=>{"targeted"=>"0", "posts_count"=>""}, "youtube"=>{"targeted"=>"0", "posts_count"=>""}, "vine"=>{"targeted"=>"0", "posts_count"=>""}, "tumblr"=>{"targeted"=>"0", "posts_count"=>""}, "pinterest"=>{"targeted"=>"0", "posts_count"=>""}, "snapchat"=>{"targeted"=>"0", "posts_count"=>""}, "periscope"=>{"targeted"=>"0", "posts_count"=>""}, "vimeo"=>{"targeted"=>"0", "posts_count"=>""}}}}, "commit"=>"Update"} - 1RevisionsForks
ActiveRecord Command
/^\s*(?<model>[A-Z0-9]+)\s(?<command>[A-Z]*)\s\((?<time>[^)]+)\)(?<command>.*)/i#+ UserConnection Exists (0.5ms) SELECT 1 AS one FROM "user_connections" WHERE "user_connections"."user_id" = $1 LIMIT 1 [["user_id", 2058]] UserConnection Load (0.3ms) SELECT "user_connections".* FROM "user_connections" WHERE "user_connections"."user_id" = $1 ORDER BY "user_connections"."id" ASC LIMIT 1 [["user_id", 2058]] User Load (0.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 20152]] #- (2.8ms) SELECT COUNT(*) FROM "posts" WHERE "posts"."user_id" = $1 AND "posts"."network" = $2 [["user_id", 2058], ["network", "snapchat"]] (1.1ms) SELECT COUNT(*) FROM "posts" WHERE "posts"."user_id" = $1 AND "posts"."network" = $2 [["user_id", 2058], ["network", "pinterest"]] (1.0ms) SELECT COUNT(*) FROM "posts" WHERE "posts"."user_id" = $1 AND "posts"."network" = $2 [["user_id", 2058], ["network", "vine"]] (0.6ms) SELECT COUNT(*) FROM "posts" WHERE "posts"."user_id" = $1 AND "posts"."network" = $2 [["user_id", 2058], ["network", "instagram"]] - 5RevisionsForks
Ruby Time.parse supported formats
/^((\d{2,4}-\d{1,2}-\d{1,2})|(\d{1,2}\/\d{1,2}\/\d{2,4}))(\s+\d{1,2}:\d{1,2}:\d{1,2}(\s[a-zA-Z]{3})?)?$/g#+ 2015-4-15 4/10/1979 2015-08-19 20:55:13 UTC 2015-08-19 20:55:13 #- 1987-03-19 MST - 2RevisionsForks
55b0077775622d338a010000
/^.*Republic\sof\s(the\s)?/igmRepublic of China People's Republic of China Democratic Republic of the Congo - 4RevisionsForks
Twitter tail links
/\s+https?:\/\/t.co\/\w+$/gmOne of my favorite movies. http://t.co/6424QkMIIz One of my favorite movies. http://t.co/6424QkMIIz go see it - 2RevisionsForks
Valid classification names
/^[A-Z][A-Z0-9 \-]+(((: )| & )[A-Z0-9 \-]+)*$/i#+ Music: Artist Music & Entertainment Politics Camera Lenses Photography: Camera Lenses Arts & Crafts: Artists Arts & Crafts: Galleries & Performances Disrtict 9 With-Dash #- Music: Flourish & Percent% 8mile - 3RevisionsForks
UNIX Timestamp Like String
/^-?[0-9]{5,}$/g#+ Timestamp Like Formats 543192626 -123456 #- Localized Time Formats 1987-03-19 3-19-1987 - 15Revisions25Forks
Red Green Corpus Test
/k[^\s]*s/giDemonstrates how regex corpus unit tests work.Corpus tests allow you to unit test your regular expressions using a typical red/green development flow. Test sections are marked indicating if the following lines should (#+) or should not (#-) match the regex pattern. Blank lines are ignored. #+ The following lines will be tested. If they match, they'll be hilighted in green, otherwise they'll be red mickey mouse. Mighty Mouse. #- Nothing below this line should match, if it does it'll show up red danger mouse #+ You can switch back to positive matching Miney mouse #- And back again. magic mouse # Oops shouldn't match - 3RevisionsForks
Simple MIME type validation
/^[a-z0-9.]+\/[a-z0-9\-\.]+$/i#+ application/pdf application/vnd.openxmlformats-officedocument.wordprocessingml.document application/vnd.ms-word.template.macroEnabled.12 #- app 123 - 1RevisionsForks
54ff712675622d09fa672e00
/^(https?:)?\/\//#+ http://www.xheo.com https://www.niche.co //twitter.com #- wysihtml5.js