# 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...
/^(?:(\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...