You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<td style="vertical-align: top; word-wrap: break-word">A regular expression that is matched to a sequence in order to find the subsequence of the same. For example, \d\d(.*)WSO2.</td>
28
+
<td style="vertical-align: top; word-wrap: break-word">A regular expression that is matched to a sequence in order to find the subsequence of the same. For example, <code>\d\d(.*)WSO2</code>.</td>
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, 21 products are produced by WSO2.</td>
36
+
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, <code>21 products are produced by WSO2</code>.</td>
<td style="vertical-align: top; word-wrap: break-word">The starting index of the input sequence from where the input sequence ismatched with the given regex pattern. eg: 1, 2.</td>
43
-
<td style="vertical-align: top"></td>
44
+
<td style="vertical-align: top; word-wrap: break-word">The starting index of the input sequence from where the input sequence ismatched with the given regex pattern.For example, <code>10</code>.</td>
from InputStream select inputSequence , regex:find(\d\d(.*)WSO2, 21 products are produced by WSO2 currently) as aboutWSO2 insert into OutputStream;
56
-
55
+
regex:find('\d\d(.*)WSO2', '21 products are produced by WSO2 currently') as aboutWSO2)
57
56
```
58
-
<pstyle="word-wrap: break-word">This method attempts to find the subsequence of the 'inputSequence' that matches the regex pattern, \d\d(.*)WSO2. It returns true as a subsequence exists.</p>
57
+
<pstyle="word-wrap: break-word">This method attempts to find the subsequence of the input.sequence that matches the regex pattern, <code>\d\d(.*)WSO2</code>. It returns <code>true</code> as a subsequence exists.</p>
from InputStream select inputSequence , regex:find(\d\d(.*)WSO2, 21 products are produced currently) as aboutWSO2 insert into OutputStream;
65
-
66
-
```
67
-
<pstyle="word-wrap: break-word">This method attempts to find the subsequence of the 'inputSequence' that matches the regex pattern, \d\d(.*)WSO2 . It returns 'false' as a subsequence does not exist.</p>
from InputStream select inputSequence , regex:find(\d\d(.*)WSO2, 21 products are produced within 10 years by WSO2 currently by WSO2 employees, 30) as aboutWSO2 insert into OutputStream;
74
-
61
+
regex:find('\d\d(.*)WSO2', '21 products are produced by WSO2.', 4)
75
62
```
76
-
<pstyle="word-wrap: break-word">This method attempts to find the subsequence of the 'inputSequence' that matches the regex pattern, \d\d(.*)WSO2 starting from index 30. It returns 'true' since a subsequence exists.</p>
77
-
78
-
### group *<atarget="_blank"href="https://siddhi.io/en/v5.0/docs/query-guide/#function">(Function)</a>*
79
-
80
-
<pstyle="word-wrap: break-word">This method returns the input subsequence captured by the given group during the previous match operation.</p>
63
+
<pstyle="word-wrap: break-word">This method attempts to find the subsequence of the input.sequence that matches the regex pattern, <code>\d\d(.*)WSO2</code> starting from index <code>4</code>. It returns 'false' as subsequence does not exists.</p>
81
64
65
+
### group *<atarget="_blank"href="http://siddhi.io/en/v5.0/docs/query-guide/#function">(Function)</a>*
66
+
<pstyle="word-wrap: break-word">Returns the subsequence captured by the given group during the regex match operation.</p>
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, 21 products are produced by WSO2.</td>
93
+
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, 2<code>1 products are produced by WSO2</code>.</td>
108
94
<td style="vertical-align: top"></td>
109
95
<td style="vertical-align: top">STRING</td>
110
96
<td style="vertical-align: top">No</td>
111
97
<td style="vertical-align: top">No</td>
112
98
</tr>
113
99
<tr>
114
100
<td style="vertical-align: top">group.id</td>
115
-
<td style="vertical-align: top; word-wrap: break-word">The given group id of the regex expression. For example, 0, 1, 2, etc.</td>
101
+
<td style="vertical-align: top; word-wrap: break-word">The given group id of the regex expression. For example, <code>2</code>.</td>
116
102
<td style="vertical-align: top"></td>
117
103
<td style="vertical-align: top">INT</td>
118
104
<td style="vertical-align: top">No</td>
@@ -123,18 +109,14 @@ from InputStream select inputSequence , regex:find(\d\d(.*)WSO2, 21 products are
from InputStream select inputSequence, regex:group(\d\d(.*)(WSO2.*), 21 products are produced within 10 years by WSO2 currently by WSO2 employees, 3)
129
-
insert into OutputStream;
112
+
regex:group('\d\d(.*)(WSO2.*)(WSO2.*)', '21 products are produced within 10 years by WSO2 currently by WSO2 employees', 3)
130
113
```
131
-
<pstyle="word-wrap: break-word">This function returns 'WSO2 employees', the input subsequence captured within the given groupID, 3 after grouping the 'inputSequence' according to the regex pattern, \d\d(.*)(WSO2.*). </p>
<pstyle="word-wrap: break-word">This method attempts to match the 'inputSequence', from the beginning, against the 'regex' pattern.</p>
114
+
<pstyle="word-wrap: break-word">Function returns 'WSO2 employees', the subsequence captured by the groupID 3 according to the regex pattern, <code>\d\d(.*)(WSO2.*)(WSO2.*)</code>.</p>
<pstyle="word-wrap: break-word">Match the input.sequence from the beginning against the regex pattern, and unlike <code>regex:matches() it does not require that the entire input.sequence be matched.</code></p>
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, 21 products are produced by WSO2.</td>
144
+
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, <code>21 products are produced by WSO2</code>.</td>
from InputStream select inputSequence, regex:lookingAt(\d\d(.*)(WSO2.*), 21 products are produced by WSO2 currently in Sri Lanka)
155
+
regex:lookingAt('\d\d(.*)(WSO2.*)', '21 products are produced by WSO2 currently in Sri Lanka')
176
156
```
177
-
<pstyle="word-wrap: break-word">This method attempts to match the 'inputSequence' against the regex pattern, \d\d(.*)(WSO2.*) from the beginning. Since it matches, the function returns 'true'.</p>
157
+
<pstyle="word-wrap: break-word">Function matches the input.sequence against the regex pattern, <code>\d\d(.*)(WSO2.*)</code> from the beginning, and as it matches it returns <code>true</code>.</p>
from InputStream select inputSequence, regex:lookingAt(WSO2(.*)middleware(.*), sample test string and WSO2 is situated in trace and it's a middleware company)
161
+
regex:lookingAt('WSO2(.*)middleware(.*)', 'sample test string and WSO2 is situated in trace and it's a middleware company')
184
162
```
185
-
<pstyle="word-wrap: break-word">This method attempts to match the 'inputSequence' against the regex pattern, WSO2(.*)middleware(.*) from the beginning. Since it does not match, the function returns false.</p>
<pstyle="word-wrap: break-word">This method attempts to match the entire 'inputSequence' against the 'regex' pattern.</p>
163
+
<pstyle="word-wrap: break-word">Function matches the input.sequence against the regex pattern, <code>WSO2(.*)middleware(.*)</code> from the beginning, and as it does not match it returns <code>false</code>.</p>
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, 21 products are produced by WSO2.</td>
193
+
<td style="vertical-align: top; word-wrap: break-word">The input sequence to be matched with the regular expression. For example, <code>21 products are produced by WSO2</code>.</td>
217
194
<td style="vertical-align: top"></td>
218
195
<td style="vertical-align: top">STRING</td>
219
196
<td style="vertical-align: top">No</td>
@@ -224,17 +201,13 @@ from InputStream select inputSequence, regex:lookingAt(WSO2(.*)middleware(.*), s
from InputStream select inputSequence, regex:matches(WSO2(.*)middleware(.*), WSO2 is situated in trace and its a middleware company)
204
+
regex:matches('WSO2(.*)middleware(.*)', 'WSO2 is situated in trace and its a middleware company')
230
205
```
231
-
<pstyle="word-wrap: break-word">This method attempts to match the entire 'inputSequence' against WSO2(.*)middleware(.*) regex pattern. Since it matches, it returns 'true'.</p>
206
+
<pstyle="word-wrap: break-word">Function matches the entire input.sequence against <code>WSO2(.*)middleware(.*)</code> regex pattern, and as it matches it returns `true`.</p>
from inputStream select inputSequence, regex:matches(WSO2(.*)middleware, WSO2 is situated in trace and its a middleware company)
210
+
regex:matches('WSO2(.*)middleware', 'WSO2 is situated in trace and its a middleware company')
238
211
```
239
-
<pstyle="word-wrap: break-word">This method attempts to match the entire 'inputSequence' against WSO2(.*)middleware regex pattern. Since it does not match, it returns 'false'.</p>
212
+
<pstyle="word-wrap: break-word">Function matches the entire input.sequence against <code>WSO2(.*)middleware</code> regex pattern. As it does not match it returns `false`.</p>
0 commit comments