1 2 3 4
def parse_url(url) matches = url.match(/\/([\d]{10})/) return nil unless matches ...
1 2 3
def encode self[:code] = self[:code].gsub(/\&/, "&").gsub(/\</, "<").gsub(/\>/, ">") end
Ruby Ruby Html Encode
I'm looking for an easier/b...
1 2 3 4
<?php function get_title($html_page) { ...
PHP Get Title of HTML page
Extract and return the bits...
1 2 3 4
def space_out_camel_case(stringAsCamelCase): """Adds spaces to a camel case string. Failure to space out string returns the original string. >>> space_out_camel_case('DMLSServicesOtherBSTextLLC') ...
Python CamelCase to Camel Case (Py...
by bigsassy.myopenid.com,
December 18, 2008 19:06,
4 refactorings, tagged with short, snippet, camelcase, camel case, re, regular expression
Hi, I'm a python newbie. C...
1 2 3 4
List<Document> documents = documentLayer.GetDocuments(username);
List<Document> filteredDocuments = new List<Document>();
...
C# Filterting a List<> w...
by mantis7.myopenid.com,
November 25, 2008 16:33,
2 refactorings, tagged with regular expression, C#, List, filter
Have the below code which f...
1 2 3 4
/^(?:(\d)[ \-\.]?)?(?:\(?(\d{3})\)?[ \-\.])?(\d{3})[ \-\.](\d{4})(?: ?x?(\d+))?$/ # expanded version w/ comments ...
Ruby Phone number regex
by Lex,
October 31, 2008 16:00,
3 refactorings, tagged with phone number, regex, regexp, regular expression
I wrote this regex for pars...
I want to return nil if not...