Fix about_regular_expressions.rb koan

* /pattern/.class returns Regexp

[#54145647]

Fix about_regular_expressions.rb koan

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

* delimiters are /'some-text'/

[#54145647]
Fix about_regular_expressions.rb koan

* a failed match returns nil

*

[#54145647]

Fix about_regular_expressions.rb koan

* ? == optional

[#54145647]
Fix about_regular_expressions.rb koan

* + means 1 or more

[#54145647]

Fix about_regular_expressions.rb koan

* '*' means zero or more

[#54145647]
Fix about_regular_expressions.rb koan

* left most expression wins

[#54145647]

Fix about_regular_expressions.rb koan

* character classes give options

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

[#54145647]
Fix about_regular_expressions.rb koan

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

[#54145647]

Fix about_regular_expressions.rb koan

* character classes can include ranges

* [/[0-9]+/]

[#54145647]
Fix about_regular_expressions.rb koan

* \s is a whitespace character

[#54145647]

Fix about_regular_expressions.rb koan

* \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

[#54145647]

Fix about_regular_expressions.rb koan

* ^ will negate a character class

[#54145647]
Fix about_regular_expressions.rb koan

* Character classes can be negated with capitals

[#54145647]

Fix about_regular_expressions.rb koan

* \A anchors to the start of a string

[#54145647]
Fix about_regular_expressions.rb koan

* \z anchors to the end of the string

[#54145647]

Fix about_regular_expressions.rb koan

* ^ anchors to to the start of a newline

[#54145647]
Fix about_regular_expressions.rb koan

* $ anchors to the end of lines

[#54145647]

Fix about_regular_expressions.rb koan

* \b anchors to word boundary

[#54145647]
Fix about_regular_expressions.rb koan

* Parentheses group content

[#54145647]

Fix about_regular_expressions.rb koan

* "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

[#54145647]

Fix about_regular_expressions.rb koan

* 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]