Welcome To Snipplr
Everyone's Recent Regular Expression Snippets Tagged regex
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
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
638
posted 14 years ago by remotezygote
This finds individual CSS attributes, i.e. "foo : bar;" or "bar : 2px solid foo;"
4
1266
posted 14 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
697
posted 14 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
651
posted 14 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
645
posted 14 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
746
posted 14 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
669
posted 14 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
567
posted 14 years ago by rwczippy
<p(.+)">
wählt alle p tags
<option>
dies entfernt alle
<option>
<option>
<option>
0
514
posted 14 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
643
posted 15 years ago by cristianciofu
This email snippet was borrowed from (FlashJunior), the original snippit is: http://snipplr.com/view/7743/email-check/
0
488
posted 15 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
827
posted 15 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
1012
posted 15 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
691
posted 15 years ago by banzaiman
I use in textmate / e to convert whitespace to underscores.
6
623
posted 16 years ago by lagrangeapex