Skip to content

Commit

Permalink
Merge pull request #29 from mrsweaters/master
Browse files Browse the repository at this point in the history
Update docs for custom regular expression.
  • Loading branch information
abitdodgy authored Nov 26, 2018
2 parents 673233c + 6853146 commit 5f3ea74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ You can pass your own criteria as a Ruby regular expression to split your string
For example, if you wanted to include numbers, you can override the regular expression:
```ruby
counter = WordsCounted.count("Numbers 1, 2, and 3", regexp: /[\p{Alnum}\-']+/)
counter = WordsCounted.count("Numbers 1, 2, and 3", pattern: /[\p{Alnum}\-']+/)
counter.tokens
#=> ["Numbers", "1", "2", "and", "3"]
```
Expand Down

0 comments on commit 5f3ea74

Please sign in to comment.