# Initial attributes Hash
#
attributes = {
...
Ruby Ruby Hash Extraction Using ...
by notbrain.myopenid.com,
February 24, 2010 23:13,
8 refactorings, tagged with rails, ruby, regex, hash, block
I'm looking for a better wa...
class PropertyGroups
def self.from_xml(xml)
document = Document.new(xml)
...
Ruby Ruby text replacement done ...
The code is part of a libra...
def check_user_agent
if api_access?
regex = Regexp.new("^([^/[:space:]]*)(/([^[:space:]]*))?([[:space:]]*\[[a-zA-Z][a-zA-Z]\])?[[:space:]]*(\\((([^()]|(\\([^()]*\\)))*)\\))?[[:space:]]*")
...
Ruby warning: character class ha...
Hola guys.. I am somewhat l...
category_id = category_name.scan(/category-(\d+)/)[0][0]
Ruby Ugly RegEx Accessor
I try to extract an id from...
/(?<part>(w(?!ww)|w(?=www)|w(?=[a-z0-9]+ww)|ww(?=[a-z0-9]+w)|www[a-z0-9]+|[a-vx-z0-9])[a-z0-9]*)\.example\.com/
Ruby Shortest regular expression...
I have written this regular...
/^(?:(\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...
require 'net/http' require 'uri' require 'strscan' ...
Ruby Display jpg image url from ...
This code display jpg image...
Input: "the big state:activ...