Welcome To Snipplr
Everyone's Recent Regular Expression Snippets
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
There are multiple ways of checking email adresses about their validity. This script is based on RFC 2822.
Please note that based on RFC 2822 [email protected] is considered valid.
The second snippet is the one I prefer, which only accepts T...
2
4110
posted 17 years ago by pacey
will split the string
"I am" search words
into
[0] => I am
[1] => searching
[2] => words
1
2108
posted 17 years ago by svenito
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
2062
posted 17 years ago by remotezygote
This regular expression will match almost all valid email addresses. Omits email addresses containing double-quotes and square brackets, which while valid according to [RFC 2822][rfc2822], are almost never used.
[rfc2822]: http://tools.ietf.org/ht...
2
2346
posted 17 years ago by chrisdpratt
This finds individual CSS attributes, i.e. "foo : bar;" or "bar : 2px solid foo;"
4
3156
posted 17 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
2366
posted 17 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
2161
posted 17 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
2006
posted 17 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
2443
posted 17 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
1913
posted 17 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
1803
posted 17 years ago by rwczippy
<p(.+)">
wählt alle p tags
<option>
dies entfernt alle
<option>
<option>
<option>
0
1584
posted 17 years ago by nico65
Use this to extract an HTML5 origin from a URI. $1 is the origin.
The square brackets are there to support IPv6 addresses.
Example:
var html5OriginRegex = /^([\w-]+:\/*\[?[\w\.:-]+\]?(?::\d+)?).*/;
"http://www.google.com:42/foo/bar/...
0
1486
posted 17 years ago by Sephr
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
1963
posted 17 years ago by cristianciofu
This email snippet was borrowed from (FlashJunior), the original snippit is: http://snipplr.com/view/7743/email-check/
0
1546
posted 17 years ago by binarynomad
wiki files accumulate google-navclient-hilite junk created by the search highlighter in the google toolbar. Search the internet for "SPAN id google-navclient-hilite" and expect to see wiki entries with markup junk generated by the google toolbar....
0
2162
posted 17 years ago by jimfred