# 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

This is a fairly simple add...

55502f40dc8b7c769880b10874abc9d0 Talk
def parse_url(url)
  matches = url.match(/\/([\d]{10})/)
  return nil unless matches
...

Ruby Return nil if nothing matched

by Fu86, June 19, 2010 10:16, 3 refactorings, tagged with regular expression, shorten

I want to return nil if not...

Ee0505bbd355292778077fb662c88f13 Talk
def encode
    self[:code] = self[:code].gsub(/\&/, "&amp;").gsub(/\</, "&lt;").gsub(/\>/, "&gt;")
end

Ruby Ruby Html Encode

by codeimpossible, February 14, 2010 03:09, 2 refactorings, tagged with ruby, regular expression

I'm looking for an easier/b...

55997cec217233703cbf68b689578771 Talk
/^(?:(\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...

Aca17ffad5faa4b9f2ea9090b56a1c59 Talk