@@ -11,6 +11,19 @@ $ npm test
11
11
```
12
12
13
13
14
+ ## [ .metntionsRegex] ( index.js#L16 )
15
+ > Default regex is ` \s+@(\w{1,30}|[A-Za-z0-9_.]{1,30})\s+ `
16
+
17
+ * ` [options] ` ** {Object}**
18
+ - ` startSpace ` ** {Boolean}** if ` false ` , will remove starting ` \s+ ` from regex
19
+ - ` endSpace ` ** {Boolean}** if ` false ` , will remove ending ` \s+ ` from regex
20
+ - ` length ` ** {Number}** maximum length of mention, default ` 30 `
21
+ - ` match ` ** {String}** what to match, default is ` \w{1,30} `
22
+ - ` flags ` ** {String}** every valid RegExp flag, default ` undefined `
23
+ - ` dot ` ** {Boolean}** replace options.match which is ` \w ` with ` [A-Za-z0-9_.] `
24
+ * ` return ` ** {RegExp}**
25
+
26
+
14
27
## Usage
15
28
> For more use-cases see [ tests] ( ./test.js )
16
29
@@ -60,19 +73,6 @@ str.match(mentionsRegex({flags: 'g', dot: true, startSpace: false, endSpace: fal
60
73
```
61
74
62
75
63
- ## [ .metntionsRegex] ( index.js#L16 )
64
- > Default regex is ` \s+@(\w{1,30}|[A-Za-z0-9_.]{1,30})\s+ `
65
-
66
- * ` [options] ` ** {Object}**
67
- - ` startSpace ` ** {Boolean}** if ` false ` , will remove starting ` \s+ ` from regex
68
- - ` endSpace ` ** {Boolean}** if ` false ` , will remove ending ` \s+ ` from regex
69
- - ` length ` ** {Number}** maximum length of mention, default ` 30 `
70
- - ` match ` ** {String}** what to match, default is ` \w{1,30} `
71
- - ` flags ` ** {String}** every valid RegExp flag, default ` undefined `
72
- - ` dot ` ** {Boolean}** replace options.match which is ` \w ` with ` [A-Za-z0-9_.] `
73
- * ` return ` ** {RegExp}**
74
-
75
-
76
76
## Authors & Contributors
77
77
** Charlike Mike Reagent** [ ![ author tips] [ author-gittip-img ]] [ author-gittip ]
78
78
+ [ gittip/tunnckoCore] [ author-gittip ]
0 commit comments