Welcome To Snipplr
Everyone's Recent Ruby Snippets Tagged text
- All /
- JavaScript /
- HTML /
- PHP /
- CSS /
- Ruby /
- Objective C
« Prev 1 Next »
This regular expression used in Ruby will extract the characters between single or multi-character delimiters. It helps when you have strange delimiters such as \":delimeter1: text I want to grab goes here :delimiter2:\"
0
851
posted 14 years ago by webonomic
This is an extension to Ruby's String class. Just put this code in a file and include it. This basically takes a string and adds literals and padding to it. For example, you can format a phone number with optional area code like this:
"5445556...
1
817
posted 17 years ago by Agent
This method generates random (and printable) ascii characters.
1
964
posted 18 years ago by ishikawa
« Prev 1 Next »