Fix about_regular_expressions.rb koan

* /pattern/.class returns Regexp

* "some matching content"[/match/] returns
  "match"

* delimiters are /'some-text'/

[#54145647]
Fix about_regular_expressions.rb koan

* a failed match returns nil

* ? == optional

[#54145647]
Fix about_regular_expressions.rb koan

* + means 1 or more

* '*' means zero or more

[#54145647]
Fix about_regular_expressions.rb koan

* left most expression wins

* character classes give options

* animals.select { |a| a[/[cbr]at/] }

[#54145647]
Fix about_regular_expressions.rb koan

* [/\d+/] is a digit character class

* character classes can include ranges

* [/[0-9]+/]

[#54145647]
Fix about_regular_expressions.rb koan

* \s is a whitespace character

* \w is a word character class

* equivalent to: [a-zA-Z0-9_]

[#54145647]
Fix about_regular_expressions.rb koan

* '.' is shortcut for any non new-line char
  i.e. 123

* ^ will negate a character class

[#54145647]
Fix about_regular_expressions.rb koan

* Character classes can be negated with capitals

* \A anchors to the start of a string

[#54145647]
Fix about_regular_expressions.rb koan

* \z anchors to the end of the string

* ^ anchors to to the start of a newline

[#54145647]
Fix about_regular_expressions.rb koan

* $ anchors to the end of lines

* \b anchors to word boundary

[#54145647]
Fix about_regular_expressions.rb koan

* Parentheses group content

* "Gray", "Gray, James"[/(\w+), (\w+)/, 1]

* Captures matched content by number

[#54145647]
Fix about_regular_expressions.rb koan

* Variables can be used to access captures

* I have no idea how this works

* A vertical pipe means "or"

[#54145647]
Fix about_regular_expressions.rb koan

* .scan is like find all

[#54145647]
Fix about_regular_expressions.rb koan

* .sub is like find & replace

[#54145647]
Fix about_regular_expressions.rb koan

* .gsub is like find & replace all

[#54145647]