rails/rails — pull request #11793 by jasiek (2013-08-07 12:37:57+00:00)
Title: excerpt() and highlight() now accept regular expressions.

The rationale behind this change is as follows: suppose you have a long text and you want to highlight an exact match as a whole word only. First, you need to have a way of extracting a piece of text that contains the whole word (`excerpt`) and then a way to `highlight` the same.