updated sample code using match()
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
7ff4b3a812
commit
9953e5c66b
@ -1859,13 +1859,13 @@ int hawk_fnc_match (hawk_rtx_t* rtx, const hawk_fnc_info_t* fi)
|
|||||||
str::match("abcdefgdefx", "def", 7);
|
str::match("abcdefgdefx", "def", 7);
|
||||||
------------------------------------
|
------------------------------------
|
||||||
str::match("ab\uB098cdefgdefx", /(def)g(.+)/, 1, x);
|
str::match("ab\uB098cdefgdefx", /(def)g(.+)/, 1, x);
|
||||||
q = length(x) / 2;
|
q = length(x) / 3;
|
||||||
for (i = 1; i <= q; i++) print x[i,"start"], x[i,"length"];
|
for (i = 1; i < q; i++) print x[i,"start"], x[i,"length"];
|
||||||
print RSTART, RLENGTH;
|
print RSTART, RLENGTH;
|
||||||
* ------------------------------------
|
* ------------------------------------
|
||||||
str::match(@b"ab\xB0\x98cdefgdefx", /(def)g(.+)/, 1, x);
|
str::match(@b"ab\xB0\x98cdefgdefx", /(def)g(.+)/, 1, x);
|
||||||
q = length(x) / 2;
|
q = length(x) / 3;
|
||||||
for (i = 1; i <= q; i++) print x[i,"start"], x[i,"length"];
|
for (i = 1; i < q; i++) print x[i,"start"], x[i,"length"];
|
||||||
print RSTART, RLENGTH;
|
print RSTART, RLENGTH;
|
||||||
*/
|
*/
|
||||||
return __fnc_match(rtx, fi, 1);
|
return __fnc_match(rtx, fi, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user