Creating a regular expression using the r{} literals can for example be helpful when matching URLs, because you don’t have to escape slashes:
url = "http://example.com/" # /../ literals: url.match /http:\/\/example\.com\// # => #<MatchData "http://example.com/"> # %r{} literals: url.match %r{http://example\.com/} # => #<MatchData "http://example.com/">
You can use HTML tags for formatting. Wrap code in <code> tags and multiple lines of code in <pre><code> tags.