Welcome To Snipplr


Everyone's Recent Regular Expression Snippets Tagged regex



1 2 Next »
Matches are as follows: 0 = protocol 1 = fqdn 2 = subdomain 3 = top level subdomain 4 = domain (blah.com) 5 = port 6 = path 7 = query string 8 = hash
1 1198 posted 15 years ago by remotezygote
This finds individual CSS attributes, i.e. "foo : bar;" or "bar : 2px solid foo;"
4 2089 posted 16 years ago by mocha0range
This finds CSS style names, i.e. "#foo" or "#foo, .bar" Note: You'll need to chomp the trailing "\s{" off the end of the matched string. I matched it just to make sure that it didn't get anything else.
5 1398 posted 16 years ago by mocha0range
This finds the entire style definition - from #foo to the last brace. i.e. ".foo, #bar { foo: bar; foo: bar; bar: foo; }"
4 1259 posted 16 years ago by mocha0range
Use this to quickly clean-up a file which has opening braces on a new line, a particular annoyance of mine.
1 1216 posted 16 years ago by Zenithus
This snippet is useful if you want to extract the relevant parts out of an Date header field of an email message. It was created according to the [RFC 5322 rules](http://tools.ietf.org/html/rfc5322#page-15 "RFC 5322, Page 15"). It supports named capt...
1 1451 posted 16 years ago by dreadwarrior
Credits to Julie. Here is a regex if you want this criteria: * Passwords will contain at least (1) upper case letter * Passwords will contain at least (1) lower case letter * Passwords will contain at least (1) number or special character...
2 1189 posted 16 years ago by axelitus
http://www.trentmueller.com/blog/search-and-replace-wildcard-characters-in-dreamweaver.html -and- http://www.webmasterworld.com/forum46/1288.htm
0 1043 posted 16 years ago by rwczippy
2 8712 posted 16 years ago by resurge
<p(.+)"> wählt alle p tags <option> dies entfernt alle <option> <option> <option>
0 923 posted 16 years ago by nico65
I know it's a very quick & simple Regex, but someone from work need it so I thought I should also put it here
1 1149 posted 16 years ago by cristianciofu
1 2202 posted 16 years ago by wizard04
This email snippet was borrowed from (FlashJunior), the original snippit is: http://snipplr.com/view/7743/email-check/
0 892 posted 16 years ago by binarynomad
US phone with or without parentheses
1 1125 posted 16 years ago by binarynomad
Search for Social Security Numbers
1 1020 posted 16 years ago by binarynomad
This regular expression matches any trailing whitespace at the end of a line (whitespace and tabs). Replace this with nothing to remove trailing whitespace from files.
1 1489 posted 16 years ago by kouphax
(Created for JavaScript) These are rather forgiving. Spaces, dashes, or periods are allowed as separators. Extensions can be recognized by several strings (#, x, x., ext, ext., extension). Area code: $1$2 Exchange code: $3 Station code: $...
1 1860 posted 17 years ago by wizard04
Matches CSS-style comments spanning one or multiple lines
2 1804 posted 17 years ago by mikegreen
(Supported by JavaScript, maybe other languages)
3 6407 posted 17 years ago by wizard04
By the legendary abigail. Fails to match if and only if it is matched against a prime number of 1's. That is, '11' fails, but '1111' does not. I once heard him talk why this works, but I forgot most of it.
3 1411 posted 17 years ago by banzaiman
5 1534 posted 17 years ago by beforebeta
I use in textmate / e to convert whitespace to underscores.
6 1276 posted 17 years ago by lagrangeapex
0 2229 posted 17 years ago by axelitus
1 2 Next »