Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:eklem/words-n-numbers into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
eklem committed Feb 27, 2022
2 parents 290abbd + a236cdb commit 3c860c9
Show file tree
Hide file tree
Showing 3 changed files with 542 additions and 121 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ extract(stringOfWords, { regex: [words, emojis], toLowercase: true })
### Combining predefined regex for numbers and emoticons
```javaScript
const stringOfWords = 'A ticket to 大阪 costs ¥2000 👌😄 😢'
extract(stringOfWords, { regex: [numbers, emojis, toLowercase: true })
extract(stringOfWords, { regex: [numbers, emojis], toLowercase: true })
// returns [ '2000', '👌😄', '😢' ]
```

### Combining predefined regex for words, numbers and emoticons, converted to lowercase
```javaScript
const stringOfWords = 'A ticket to 大阪 costs ¥2000 👌😄 😢'
extract(stringOfWords, { regex: [words, numbers, emojis, toLowercase: true })
cons stringOfWords = 'A ticket to 大阪 costs ¥2000 👌😄 😢'
extract(stringOfWords, { regex: [words, numbers, emojis], toLowercase: true })
// returns [ 'a', 'ticket', 'to', '大阪', 'costs', '2000', '👌😄', '😢' ]
```

Expand Down Expand Up @@ -152,7 +152,7 @@ emojis // only emojis
tags // #tags (any language
usernames // @usernames (any language)
email // email addresses. Most valid addresses,
// but not to be used as a validator
// but not to be used as a validator
```

### Languages supported
Expand Down
Loading

0 comments on commit 3c860c9

Please sign in to comment.