# Start of file, showing the name of the application # Size, and all relevent parts of the title ...
Ruby Address Book
by https://www.google.com/accounts/o8/id?id=AItOawkiJON4MFJ9bopD8IvwQ1pbpH3ag7yrtnI,
December 28, 2011 07:36,
5 refactorings, tagged with ruby, methods, regexp, regular expression
def parse_url(url)
matches = url.match(/\/([\d]{10})/)
return nil unless matches
...
Ruby Return nil if nothing matched
I want to return nil if not...
def encode
self[:code] = self[:code].gsub(/\&/, "&").gsub(/\</, "<").gsub(/\>/, ">")
end
Ruby Ruby Html Encode
I'm looking for an easier/b...
<?php
function get_title($html_page)
{
...
PHP Get Title of HTML page
Extract and return the bits...
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, camelcase, snippet, regular expression, camel case, re
Hi, I'm a python newbie. C...
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 filter, C#, regular expression, List
Have the below code which f...
/^(?:(\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 regex, regexp, phone number, regular expression
I wrote this regex for pars...
This is a fairly simple add...