This repository was archived by the owner on Feb 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 569
Expand file tree
/
Copy pathreg-exp.ts
More file actions
92 lines (81 loc) · 2.84 KB
/
reg-exp.ts
File metadata and controls
92 lines (81 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/**
* Followers RegExp
*
* ^ asserts position at start of the string.
* followers: matches the characters followers: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const followersRegExp: RegExp = /^followers:?([^\s]+)/;
/**
* From RegExp
*
* from: matches the characters from: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const fromRegExp: RegExp = /from:?([^\s]+)/;
/**
* Near RegExp
*
* near: matches the characters near: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const nearRegExp: RegExp = /near:?([^\s]+)/;
/**
* Since RegExp
*
* since: matches the characters since: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const sinceRegExp: RegExp = /since:?([^\s]+)/;
/**
* Until RegExp
*
* until: matches the characters until: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const untilRegExp: RegExp = /until:?([^\s]+)/;
/**
* Filter RegExp
*
* filter: matches the characters filter: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const filterRegExp: RegExp = /filter:?([^\s]+)/;
/**
* hashtag RegExp
*
* hashtag: matches the characters hashtag: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const hashtagRegExp: RegExp = /#:?([^\s]+)/;
/**
* mention RegExp
*
* mention: matches the characters mention: literally (case sensitive)
*
* ([^\s]+) - First capturing group
* [^\s] - Match every non whitespace character
* Quantifier(+) - Matches between one and unlimited times, as many times as possible, giving back as needed (greedy)
*/
export const mentionRegExp: RegExp = /@:?([^\s]+)/;