2 -6 bytes thanks to mazzy

1..100|?{$_100-notmatch2}  -6 bytes thanks to mazzy Generates the range 1 to 100, then pulls out those objects where |?{...} they do -notmatch the number 2. Running the -notmatch against an array like this acts like a filter on the array. Each item is left on the pipeline, and output is implicit. # PowerShell, 22 bytes 1..100|?{$_-notmatch2}


Try it online!

Generates the range 1 to 100, then pulls out those objects where |?{...} they do -notmatch the number 2. Each item is left on the pipeline, and output is implicit.

# PowerShell, 22 16 bytes

1..100-notmatch2


Try it online!

-6 bytes thanks to mazzy

Generates the range 1 to 100, then pulls out those objects where they do -notmatch the number 2. Running the -notmatch against an array like this acts like a filter on the array. Each item is left on the pipeline, and output is implicit.

1

# PowerShell, 22 bytes

1..100|?{\$_-notmatch2}


Try it online!

Generates the range 1 to 100, then pulls out those objects where |?{...} they do -notmatch the number 2. Each item is left on the pipeline, and output is implicit.