re2js 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -131,6 +131,20 @@ RE2JS.compile('ab+c').matcher('cbbba').find() // false
131
131
  RE2JS.compile('ab+c', RE2JS.CASE_INSENSITIVE).matcher('abBBc').find() // true
132
132
  ```
133
133
 
134
+ Example to collect all matches in string
135
+
136
+ ```js
137
+ import { RE2JS } from 're2js'
138
+
139
+ const p = RE2JS.compile('abc+')
140
+ const matchString = p.matcher('abc abcccc abcc')
141
+ const results = []
142
+ while (matchString.find()) {
143
+ results.push(matchString.group())
144
+ }
145
+ results // ['abc', 'abcccc', 'abcc']
146
+ ```
147
+
134
148
  The `find()` method searches for a pattern match in a string starting from a specific index
135
149
 
136
150
  ```js
@@ -2,7 +2,7 @@
2
2
  * re2js
3
3
  * RE2JS is the JavaScript port of RE2, a regular expression engine that provides linear time matching
4
4
  *
5
- * @version v0.4.2
5
+ * @version v0.4.3
6
6
  * @author Alexey Vasiliev
7
7
  * @homepage https://github.com/le0pard/re2js#readme
8
8
  * @repository github:le0pard/re2js
@@ -324,7 +324,7 @@ class Unicode {
324
324
  // Minimum and maximum runes involved in folding.
325
325
  // Checked during test.
326
326
  static MIN_FOLD = 0x0041;
327
- static MAX_FOLD = 0x1044f;
327
+ static MAX_FOLD = 0x1e943;
328
328
 
329
329
  // is32 uses binary search to test whether rune is in the specified
330
330
  // slice of 32-bit ranges.