I developed a Sublime Text 2 Plugin, named codefoo which does some magic for you.
This plugin helps you in retrieving code snippet from web.
Do not leave the browser simply get code in 3 easy steps
1. type the query
3. press `ctrl+alt+r`
Try with these query* email validation regex
* slide To unlock css
How it works
It works by searching you query in a list of popular web pages where you find code. Then it scrapes the page to get just the code snippet.
Install Via Sublime Package Control
- You should use sublime package manager
- Use cmd+shift+P then Package Control: Install Package
- Look for CodeFo and install it.