-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathyyFilters.ps1
88 lines (72 loc) · 1.05 KB
/
yyFilters.ps1
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
# Some filter functions
#
filter match( $expr )
{
if( $_.tostring() -match $expr )
{ $_ }
}
filter notmatch( $expr )
{
if( $_.tostring() -notmatch $expr )
{ $_ }
}
filter like( $expr )
{
if( $_.toString() -like $expr )
{ $_ }
}
filter notlike( $expr )
{
if( $_.tostring() -notlike $expr )
{ $_ }
}
filter equal( $expr )
{
if( $_.tostring() -eq $expr )
{ $_ }
}
filter notequal( $expr )
{
if( $_.tostring() -ne $expr )
{ $_ }
}
filter lower( $expr )
{
if( $_.tostring() -lt $expr )
{ $_ }
}
filter greater( $expr )
{
if( $_.tostring() -gt $expr )
{ $_ }
}
filter lowerequal( $expr )
{
if( $_.tostring() -le $expr )
{ $_ }
}
filter greaterequal( $expr )
{
if( $_.tostring() -ge $expr )
{ $_ }
}
filter and( $expr )
{
if( $_.tostring() -bAND $expr )
{ $_ }
}
filter or( $expr )
{
if( $_.tostring() -bOR $expr )
{ $_ }
}
filter xor( $expr )
{
if( $_.tostring() -bXOR $expr )
{ $_ }
}
#filter not( $expr )
#{
# if( $_.tostring() -bNOT $expr )
# { $_ }
#}