Changes
Jump to navigation
Jump to search
← Older edit
Z3 Language Tests
(view source)
Revision as of 10:57, 4 January 2022
68 bytes removed
,
10:57, 4 January 2022
no edit summary
Line 80:
Line 80:
*[[ Z%5E3_Language_Documentation | See Also - Z3 Language Documentation ]]
*[[ Z%5E3_Language_Documentation | See Also - Z3 Language Documentation ]]
+
+
=Regular Expressions=
+
+
a=["cat","dog","rat"];
+
+
a.filter(
+
+
x=>x.match(/(o|t)/)
+
+
)
+
+
Output: cat dog rat
+
+
+
+
a=["cat","dog","rat","rat1"];
+
+
a.map(
+
+
x=>x.match(/[0-9]/)
+
+
)
+
+
Output: null null null 1
+
+
+
+
a=["cat","dog","r2iat","rat1"];
+
+
a.filter(
+
+
x=>x.match(/[hc]?at/)
+
+
)
+
+
Output: cat r2iat rat1
+
+
+
+
a=13;
+
+
b=34;
+
+
a..b
+
+
Output: 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
+
+
+
+
5√(1..34)
+
+
+
(2..5)√(10..34)
+
+
+
+
a=45m;
+
+
c=56cm;
+
+
a<+>c
+
+
Output: 4556cm
+
=Combinatorial Arguments and Implicit Looping=
=Combinatorial Arguments and Implicit Looping=
Line 880:
Line 944:
function x1(x){return(x+34)};x1(304)
function x1(x){return(x+34)};x1(304)
−
+
−
−
−
a=["cat","dog","rat"];
−
a.filter(
−
x=>x.match(/(o|t)/)
−
)
−
−
Output: cat dog rat
−
−
−
a=["cat","dog","rat","rat1"];
−
a.map(
−
x=>x.match(/[0-9]/)
−
)
−
−
Output: null null null 1
−
−
−
a=["cat","dog","r2iat","rat1"];
−
a.filter(
−
x=>x.match(/[hc]?at/)
−
)
−
−
Output: cat r2iat rat1
−
−
−
a=13;
−
b=34;
−
a..b
−
−
Output: 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
−
−
−
−
5√(1..34)
−
−
−
(2..5)√(10..34)
−
−
−
a=45m;
−
c=56cm;
−
a<+>c
−
Swapna
writer
2,661
edits
Navigation menu
Personal tools
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Main page
Community portal
Current events
Recent changes
Help
Tools
ZCubes Web Platform
Printable version