Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
rule ipv4_address octet "." octet "." octet "." octet { def value IPAddr.new(text_value) end } end rule octet three_digit_octet / two_digit_octet / one_digit_octet end rule one_digit_octet [0-9] end rule two_digit_octet [1-9] [0-9] end rule three_digit_octet "25" [0-4]/ "2" [0-4] [0-9] / "1" [0-9] [0-9] end
This paste will be private.
From the Design Piracy series on my blog: