[Question]
  [
Write a program or function that, when given a string, filters out as many distinct bytes as it can and returns the cleaned string. However, since your program hates them, none of these bytes can be present in your own code.
Your score will be the number of distinct bytes your program filters out from the input, with the higher the better. This is a max score of 255 (since your program has to be a minimum of one byte). The tiebreaker is the length of your code, with lower being better.
For example, if your program filters out the bytes `0123456789`, it receives a score of 10, but your program itself cannot contain these bytes.
### Rules
* Bytes mean octets.
* You also have the option to take input as a list of integers, with values ranging from 0 to 255. These correspond to the equivalent bytes.
	+ Your output should be in the same form as your input
* No reading your source code
* Your code must be non-empty
* Yes, I know there's going to be a Lenguage/Unary answer. But at least golf it please? `;)`
Edit Rule:
* You may choose to ignore a byte, for example if it is indistinguishable from the terminating byte for a string or for EOF. However, this means you can't use it in your submission, nor does it count for your score. If you choose to do so, your max score will be 254, but you don't have to handle that byte being in your input.
  
[Answer]
# [Japt](https://github.com/ETHproductions/japt) `-P`, score: 255 (2 bytes)
```
ff
```
---
`f => filter, second f => everything but 'f'`
[Try it online!](https://tio.run/##FcvdCoIwGIfxW/lnH0trWdknEXQJHXQmBIve6UKdbG9CV78UnqMHfh/VcghahxA9SuPROls4VUObisl5UEfux6Yp8PoyKuL@QmgB1bzBg@hTYPIMtgPvCN5is812@8PxdF4jTeTiKvOLSFfL0W08mT5nyTyOIO9/)
---
# [Japt](https://github.com/ETHproductions/japt), score: 255 (2 bytes)
*From @Shaggy*
```
oo
```
`o => remove everything but, second o => 'o'`
[Try it online!](https://tio.run/##FcvbCoJAFEbhV/mzw5hlmnYkgh6iu0CYaGsT6paZndDTTwrrasH30Z14z@x9cH8bh85yZXWD0tRC1oF6sj8xbYXnV1CTDBeKFXT7goxiSEPICYRH3hMcY5vlu/3heDqnSKJ4dY0fF5Vs1pPbdDYvFlG4DP4 "Japt – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), score 249, 1732 bytes
```
c="%c%%c%%%%c%%%%%%%%c"
ex=c==c
ee=c==""
exec"e=%x%%x"%ex%ex
exec"e%%%%%%%%=%x%%x%%%%x"%ee%ex%ee
exec"ee=%x%%x"%e%ee
exec"ee%%%%=%x%%x"%ex%e
exec"e=%x%%x"%ee%e
exec"ec=ex%cex"%e
exec"xe=ec%cec"%e
exec"xx=xe%cxe"%e
exec"xc=xx%cxx"%e
exec"ce=xc%cxc"%e
exec"cc=ce%cce"%e
exec"eee=xx%cec"%e
exec"cee=ce%cec"%e
exec"exe=ce%cex%%cxe"%e%e
exec"xxe=ce%cxx"%e
exec"cxe=ce%cex%%cxx"%e%e
exec"ece=ce%cec%%cxe%%%%cxx"%e%e%e
exec"xce=ce%cex%%cxe%%%%cxx%%%%%%%%cxc"%e%e%e%e
exec"cce=cc%cex%%cce"%e%e
exec"eex=cc%cex%%cec%%%%cce"%e%e%e
exec"xex=cc%cex%%cxe%%%%cce"%e%e%e
exec"cex=cc%cec%%cxe%%%%cce"%e%e%e
exec"exx=cc%cxx%%cce"%e%e
exec"xxx=cc%cex%%cxx%%%%cce"%e%e%e
exec"cxx=cc%cec%%cxx%%%%cce"%e%e%e
exec"ecx=cc%cxe%%cxx%%%%cce"%e%e%e
exec"xcx=cc%cec%%cxe%%%%cxx%%%%%%%%cce"%e%e%e%e
exec"ccx=cc%cex%%cec%%%%cxe%%%%%%%%cxx%%%%%%%%%%%%%%%%cce"%e%e%e%e%e
exec"eec=cc%cxc%%cce"%e%e
exec"xec=cc%cec%%cxc%%%%cce"%e%e%e
exec"cec=cc%cex%%cec%%%%cxc%%%%%%%%cce"%e%e%e%e
exec"exc=cc%cxe%%cxc%%%%cce"%e%e%e
exec"xxc=cc%cex%%cxe%%%%cxc%%%%%%%%cce"%e%e%e%e
exec"cxc=cc%cec%%cxe%%%%cxc%%%%%%%%cce"%e%e%e%e
exec"ecc=cc%cxx%%cxc%%%%cce"%e%e%e
exec"""x=""
"""
exec"x%c=c%%xex%%ecc%%xex%%eex"%e
exec"x%c=c%%cee%%cee%%ece%%cxx"%e
exec"x%c=c%%ccx%%xxx%%xcx%%xxe"%e
exec"x%c=c%%eex%%exx%%xec%%xxe"%e
exec"x%c=c%%xex%%cxc%%cce%%ecx"%e
exec"x%c=c%%xxe%%eex%%cxe%%cxe"%e
exec"x%c=c%%cex%%ccx%%xec%%ce"%e
exec"x%c=c%%eex%%ce%%xxx%%xcx"%e
exec"x%c=c%%ce%%eex%%ecc%%ece"%e
exec"x%c=c%%cec%%eec%%ecx%%xxx"%e
exec"x%c=c%%exc%%xxe%%cxe%%cxe"%e
cx="""eec
xec
xxx
xcx
exc
cee
cee
ece
cxx
ccx
xxx
xcx
xxe
xex
ce
cex
ccx
xec
ce
xex
ce
xxx
xcx
ce
xxx
xcx
eec
xxc
exc
xxe
cxe
xxx
cex
ce
xex
ce
xxx
xcx
cee
cee
cee
eee
xex
ecc
xex
eex
cee
xce
exe
cee
cee
cee
cxe"""
exec"exec%cx"%ce
```
[Try it online!](https://tio.run/##fVXZbhQxEHyfz7Dkl0QIiXd/DBQFOSAHBFLh55duH2PP2htpZ9bqrq6uLq@9T28vN48Pn04npBAR/VNfeRE2KiElbKR/Bw8QgSkqRoVI2afGWlXJ@coBzBhWTC8cYr2oEJ734B5CsjzowRIRE2ER9IiSGCH2CJKsSr0KTLIq9SogwarQq2havWyghpvAQ8heJWRSS8@uo2TGtgewBjDRmDNN9r4C@hSHThWy71SeZcTD8ah4jMroe9oyLDteAd3WAVKbnUHQILgIoQpEkwRp5NeSXyP/EkJUfl6ECLPKwbUd3V2bvRG7y3vpiqIbjKIL09w1U@Rg7StmBbismMJgwno3hWk336OEMJv2ngSg7/NaQgjyyyO0C8QOVjKgXJKVt9V4sgsCfj3kl52ReDhODQG/Jry3yornCGbujPCRFgixSQdyq6mL3AfuDmLmqCetdcFahtM3sTND0@qOEIsWmSYny9BTDzWto0y4@f6z3OSPtFl3q8NmzubHmhlKm@nf80ZjeIs5pKboJS3agMMy9zBe5/Z6qORQK84L2RWwpG328s2St3vPJzxgfaz9r8jddi/B0yl8/oKv/Pb95vbu/sfPh8en51@/X/78fdXbv3T94epjDP8B "Python 2 – Try It Online")
Removes everything but `exc%="` and newlines. The code generation is [xsot's](https://codegolf.stackexchange.com/a/110722/3852). I doubt it's optimized, so there are lots of bytes to save here!
[Answer]
## Haskell, score ~~249~~ 250, ~~1088~~ 335 bytes
```
(!:)((=:):(!=))=(((!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(:):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(:):(!):(!):(!):(!):(!):(!):(:):(:):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(!):(:):(!):(!):(:):(=!))!!(=:))(=:)((!:)(!=))
(!:)(=:)=(=:)
(=:)!(!=)=(!=)
(=!)=(!):(=!)
```
Defines a function `!:` that takes a list of integers and filters out all except `10,33,40,41,58,61`, the ASCII-codes of `\n ! ( ) : =`.
[Try it online!](https://tio.run/##7VHBCsIwDL33KxLYITk4RNilLF6GXyEeBk4drt1Y6/fPpjdPDtnRQh6Pl5cGXh5teHbDsCyElonEsiUUZiEiVL6i7ErfL2W/9OzGO5QLMiNqFqxAORoNxWSWJFEwCqgNUTA6J/mTRBbX9h4ErqOB9ALUO3DtBLd5dCf/clAXR7h3sRl97HwM2TXNvY9QJLcI6C741LN03pfloaou/4tte7E3 "Haskell – Try It Online")
How it works: First let's rename the functions and parameters to sane names:
```
f (x:xs) = (listOfFunctions !! x) x (f xs)                   -- (!:)
f x = x
listOfFunctions = d:d:d:d:d:d:d:d:d:k:d:d ... : infiniteDs   -- inlined
infiniteDs = d : infiniteDs                                  -- (=!)
k      = (:)                                                 -- inlined
d x xs = xs                                                  -- (!)
```
The main idea is to have a list of two different functions (`listOfFunctions`), one to keep an element (`k`) and one to drop it (`d`). The list is indexed by the current element from the input list (`x`) and the function it picks determines whether to keep or drop the element. At index 0 we have `d`, because we want to drop 0s, the first `k` is at index 10, because we want to keep 10s (newlines). Both `k` and `d` take two parameters: `x` and the result of a recursive call with the rest of the list (`xs`). `k` prepends `x` to the recursice call and `d` just returns the recursive call.
The literal list of functions ends at index 61 (char `=`, the last `k` in the list) and is followed by an infinite number of `d`. This not only saves many explicit `d`, but also prevents us from having to end a finite list with `[]` which would require additional chars.
Edit: thanks to @Ørjan Johansen for +1 score and -753 bytes.
[Answer]
# JavaScript (ES6), score: 242 (142 bytes)
A rather naive approach using an array of bytes for I/O.
```
t=>t.filter(t=>'f'>'fffffffffffffffffffffffffffffffffffffffeeeffffeffffffffffffffeeffffffffffffffffffffffffffffefefffffffeeffeffefffffefe'[t])
```
[Try it online!](https://tio.run/##jZDxSsMwEMb/31McY5AENVMQBKGFOd@iLSxLL21HTUtyjI4xX72m3SoyZXgQcvn4fV@S26m98tpVLT3YJsfeRD1FMUlT1YSOh54ZFtb/ChHH7Vq96fnGBw4nd5BZQpnoCT1BBB6iGHRjfVOjrJuCbxZH7jDIYHgipfSZ/FAt1yMndancOnxoRVyEkjXagsoTbA@E3IvX1CaLY7DLXVNZzu6ZOGWp3YjZbLiPz9PH1MLqbf2utjr/TLsXk3bGzAUsl2AbKitbXEjGhYziJMMwMkeBmCqQuEd3GGHgVCI8PcPwMKXDbD1QqQiUwyEQzgPHXFxip/OPwL9isdPYErCcnX0G7oCxa88vX/8F "JavaScript (Node.js) – Try It Online")
### How?
The 14 characters that are not filtered are `'().=>[]efilrt`. They are marked with an `e` in the lookup string. For characters above `t` (ASCII code 116) which are not defined in this string, `'f'>undefined` is *false*.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), score: 253, tiebreaker: 8 [bytes](https://codegolf.meta.stackexchange.com/a/9429/43319 "When can APL characters be counted as 1 byte each?")[SBCS](https://github.com/abrudz/SBCS ".dyalog files using a single byte character set")
Anonymous tacit prefix function
```
∩∘'∩∘'''
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT////1HHykcdM9ShlLr6/7RHbRMe9fY96pvq6f@oq/nQeuNHbROBvOAgZyAZ4uEZ/D9NPS8/P6lYnSsNpA/GzAMaAESoHHX1YnUA "APL (Dyalog Unicode) – Try It Online")
`∩` intersection of the argument
`∘` and
`'∩∘'''` the three characters in the code (`∩∘'`)
[Answer]
# [C (gcc)](https://gcc.gnu.org/), score ~~232~~ ~~235~~ ~~239~~ ~~241~~ 242, ~~260~~ ~~407~~ ~~352~~ ~~249~~ ~~243~~ 249 bytes
```
fn(int*f,int*i,int*n,int**t){if(f==i)if(*t=n){}if((f==i)==('+'=='*')){if((*f==',')+(*f=='\'')+(*f=='(')+(*f==')')+(*f=='*')+(*f=='+')+(*f=='=')+(*f=='\\')+(*f=='f')+(*f=='i')+(*f=='n')+(*f=='t')+(*f=='{')+(*f=='}'))if(*n++=*f){}if(fn(++f,i,n,t)){}}}
```
[Try it online!](https://tio.run/##5VLbTsMwDH1ev8IMQXMrKq9s2RdMvCCeGEKjazZLI53aVKBV/fbhpCPrvoEX5@jYPj62UmTbojidjGVonTDKRwzRhigc79AwozVyeoXTlnc9oYHSmqUy1ToVKQ@FTBCfqpTLAa3SCFlEPCIRkYxIX5pXEZqIMCIbkYuoi6gnR96xlVILM5imNaWkJZVVjvz2fX@6RVvs200J88ZtsHrYLZIxVaPdei6hY8DXGi3j0CWTYreuofhszVv@85jn77Nk0jR4LD8cIGFffEkqEKXdEP29w30JzGxL1zDfrSBUKPCzLYcbDc@vy2UYMTFVDQxBQz4bRuH7DFBKTjmAgaDsX8p3WBZEKUgMj4J7Gs190nsIYmNp4jIqI11YhEGYZYN@EQeM9A9tNE6Oq9Z55T65soowH7YazF6M@sOMHZ5Xv3J5oHs7w6Yr@1JUdfkEd8d2er4SZMD8Dplv4VTd/99v@ws "C (gcc) – Try It Online")
A function taking [a pointer to the beginning and end of an int array](https://codegolf.meta.stackexchange.com/a/14972/) (where end is the first character not included), a pointer to a buffer and a pointer to another int pointer. It writes the result into the buffer and the end pointer of the result into the last pointer.
[Answer]
# Regex, Score: 255, 2 bytes
```
\\
```
Matches the character `\`.
[Try it online!](https://tio.run/##DcxpX4IwHADg934KWodb4bpP0iyzsrRDSDvIWuOvLHHQNgw7Pjvx/vk9XFe4FnmqhRxZ7kwbmFAPMkO7MEojpppZokBrEUvtlIaxAsZDPGXKGltCWi1ZOBZ4cVMGmFA3iYTBZV@WCSn1lTDQFhKwNqrYaSOWnBlcxJDRDjM8BI3Hdh3lvp@jIkoixgEjXyIbIVJ0EAE3mFdrnPZYlAIhxMmtOTS/sLhUxmR5xa7Q1bX1jc2t7Z3dvf0D57BaO6ofnzROm2fnF63Lq3bn@ub2rut6973@w@PTs/8yeH1j7zyA4SgUH@NoIuPkU2mTTr@y2ffP798/ "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), score 254 (4 bytes)
```
f⁾f⁾
```
[Try it online!](https://tio.run/##y0rNyan8/z/tUeM@IEr7//9/YlJySiqQvxfET01JTkoEAA "Jelly – Try It Online")
`⁾xy` is shorthand for `“xy”` (a two-character string).
We `f`ilter the input string down to just the characters occurring in `“f⁾”`.
[Answer]
# [POSIX shell](https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap02.html), score 249, 18 bytes
```
tr -cd \\\\\ cdrt-
```
[Try it online!](https://tio.run/##S0kszvj/v6RIQTc5RSEGBBSSU4pKdP//V1RSVlFVU9fQ1NLW0dXTNzA0MjYxNTO3sLSytrG1s3dwdHJ2cXVz9/D08vbx9fMPCAwKDgkNC4@IjIqOiY2LT0hMSk5JTUvPyMzKzsnNyy8oLCouKS0rr6isqq6prePKycxLVTDiKgEA "Dash – Try It Online")
Simple [`tr` command](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/tr.html) that deletes all characters but `-\cdrt` and space. Four backslashes are needed because both the shell and the `tr` command use backslash escapes. The fifth backslash escapes the following space character.
If `tr -cd` was considered a programming language, one could write a single byte progam with score 255.
[Answer]
# [Ruby](https://www.ruby-lang.org/) -p, score 248 (8 unique bytes / 483 bytes)
```
eval""<<11+11+11+1+1+1<<11+11+11+11+11+11+11+11+1+1+1+1+1+1+1<<11+11+11+11+1+1<<111+1+1+1+1+1<<111+1+1+1<<11+11+11<<11+11+11+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1<<111+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1<<11+11+11+11+1+1+1+1+1<<11+11+11+1<<11+11+11+1+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+1+1+1+1+1<<11+11+11+1+1+1+1+1+1<<11+11+11+11<<11+11+11+1+1+1+1+1+1<<11+11+11+1+1+1+1+1+1
```
[Try it online!](https://tio.run/##KypNqvz/P7UsMUdJycbG0FAbikAQmY@GkCGaMogAmjyGUnS7SLARjyJs1pPgE2JMJ@B3TGHsPsVtHTYZHOoJK0HA///DHH1cgfGcqqSkpKysDAojbe1/@QUlmfl5xf91CwA "Ruby – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), Score ~~244~~ ~~245~~ 246, ~~13390~~ 1575 bytes
Takes a list of integers
```
exec'%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c'%(111+1,111+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1,111+1+1+1+1+1,11+11+11+11+11+11+11+11+1+1+1,111+1+1+1+1+1+1+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1,11+11+11+11+11+11+11+11+11+11+1,111+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,111+1+1+1+1+1+1+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1,111+1,111+1+1+1+1+1+1,111+1+1+1+1+1,11+11+11+1+1+1+1+1+1+1,11+11+11+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,111+1+1+1+1+1+1+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1,11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1,111+1,11+11+11+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+11+11+1,111+1+1+1,11+11+11+11+11+11+11+11+11+1,11+11+11+1+1+1+1+1+1+1+1+1+1+1,11+11+11+1,11+11+11+11+11+11+11+11+11+1+1,111+1+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1+1,11+11+11+1+1+1+1+1+1,11+11+11+1+1+1+1,11+11+11+1+1+1+1+1+1+1+1+1+1,11+11+11+1+1+1+1+1+1+1,11+11+11+1+1+1+1+1+1+1+1,11+11+11+11+1+1+1+1+1,11+11+11+1+1+1+1+1+1+1+1+1+1+1,11+11+11+1,11+11+11+1+1+1+1+1+1+1+1,11+11+11+11+11+11+11+11+1+1+1+1+1)
```
[Try it online!](https://tio.run/##K6gsycjPM/r/P7UiNVldNZl@UF1Vw9DQUNtQB0xqQ1jaOBECEqkMRQNR2jHVouvBLYPPQG18CNP7hDxABUeRH5D0txGL/3FGqDZhYeq5dQTEF3F5BmuEEYgSIvMCLmXE@JqwN/HHE2lhjF9Qh8jQJSMBE2UFrlAh1eea//8XJealp2oYmZppAgA "Python 2 – Try It Online")
This evaluates to the following line of code:
```
print[x for x in input()if x in map(ord,"exc'%+()1,")]
```
---
# [Python 2](https://docs.python.org/2/) Score 248, \$ \sim 2^{52}\$ bytes
This answer is obviously a theoretical one.
The structure is
```
exec'<2**51 times %>c<2**50 times %>c ... %%c%c'%<112 times -~>0%<114 times -~>0% ... %<41 times -~>0%<93 times -~>0
```
In theory this would execute the same as:
```
print[x for x in input()if x in map(ord,"exc'%-~0")]
```
---
# [Python 3](https://docs.python.org/3/), Score ~~240~~ 241, 54 bytes
+1 thanks to [Jonathan Allan](https://codegolf.stackexchange.com/users/53748/jonathan-allan).
```
lambda a:[i for i in a if i in b""" ":[]abdfilmnor"""]
```
[Try it online!](https://tio.run/##LYyxDsIgFEX3fsWVpIEmdtHo0ERndweH2gEKVBIKzZOlX49YfdPNveedZU2vGI7Z4oJn9nJWWkJ2vYONBAcXIOHsLynGGFjXD1Jp6/wcIpVmyFSerSAZJiMOp3PTVAu5kAS/j5FMx/coLVp4EwSVtfq602bkN@N9xCOS17sCKp7MO21hjNpM0VveVcBfWBPaK2riqCFSodaCCytSUy5/AA "Python 3 – Try It Online")
[Answer]
# [Clean](https://github.com/Ourous/curated-clean-linux), score 247, ~~234~~ ~~213~~ 208 bytes
*-5 bytes thanks to [Ørjan Johansen](https://codegolf.stackexchange.com/users/66041/%C3%98rjan-johansen)*
```
== =t
t['\'':t]=['\'': ==t]
t['\\':t]=['\\': ==t]
t[':':t]=[':': ==t]
t['[':t]=['[': ==t]
t[']':t]=[']': ==t]
t['t':t]=['t': ==t]
t['=':t]=['=': ==t]
t[' ':t]=[' ': ==t]
t['
':t]=['
': ==t]
t[tt:t]= ==t
t t=t
```
[Try it online!](https://tio.run/##Tc@xDoIwFIXhvU9xt8KAMSY6kNxNBxM3RujQQEUiLUaOJr68FbDGbuf/tlP3Rjtvh@bRG7K6c56ZGAKlrKTMofg7iBlq0eqnVaR5wDyyMlgZmQqmIkMwRMbBODIKRpGJYOJvwExzCRAYvrO34Q4q0BzcUxTQUzBttjvKqDeuxYWS6XQCfTULT9/WcrVSaerf9bnX7eiz48nvX07brh4/ "Clean – Try It Online")
Uses a pattern-matching recursive function to remove characters. Doesnt even need `StdEnv`.
[Answer]
# Lenguage (with `stty +brkint -ignbrk`), score 255, 3890951 bytes
The program consists of 3890951 NUL bytes (making this one of the shortest Lenguage programs ever; 3890951 bytes is easily small enough to fit on my disk, so I actually ran this in a Lenguage interpreter). The OP wanted the Lenguage/Unary solution to be golfed, so here we go. (Note that Unary would be much longer because it requires the use of `0` rather than allowing the use of NUL.)
Note that Lenguage does not, despite what its documentation implies, act like brainfuck does; I/O works entirely differently (something that I noticed when testing this program). In particular, Lenguage refuses to take input from anything other than a terminal, so the bytes that are being filtered out are the raw bytes sent over the terminal connection (note also that as it's filtering out the raw bytes, you won't see the keys you type at all). In practice, this means that the program will absorb any sort of input sent to it except for the NUL byte (typically typed as Ctrl-@), which will be echoed literally (at which point, the vast majority of terminals will ignore it, as the NUL byte is the terminal equivalent of a NOP instruction). In order to verify that the program works, it's simplest to modify the Lenguage interpreter to output in decimal, leading to the echo being actually visible.
What happens at EOF? Well, if the terminal is sending a series of bytes, there's no way to send EOF; all 256 possible bytes are interpreted literally, and there's nothing else you can insert into the terminal stream. However, if you happen to be using an old-fashioned serial terminal, you can press the "break" button on your terminal to purposely send misencoded data, allowing for a 257th possible code; this "break" is the only plausible equivalent of an EOF, as it's sent out-of-band and indicates something other than valid data. If your terminal configuration has the "interrupt-on-break" flag set (and the Lenguage interpreter does not, as far as I can tell, alter that setting), sending the break signal will cause the Lenguage interpreter to crash, which conveniently acts as a way to implement the desired EOF behaviour. I'm not sure whether this is a default setting (because nobody actually uses serial terminals nowadays, it basically never comes up), so I mentioned it in the header as part of the specification of the language interpreter being used.
## Explanation
```
  1110110101111100000111
001                       Initialise tape element 0 to -1
   110               111  While tape element 0 is nonzero:
      110   111              While tape element 0 is nonzero:
         101                    Read a byte from the terminal into tape element 0
               100           Output tape element 0
                  000        Add 1 to tape element 0
```
The inner loop will only exit when NUL is typed at the terminal; after this, we immediately echo the character typed (i.e. the NUL). Adding 1 at this point will ensure that tape element 0 is nonzero again, so the outer loop cannot exit at all (until a break input crashes the interpreter), and we'll fall back into the inner loop.
It's golfiest to use subtraction to enter the outer loop, but addition to continue looping around it; addition has a shorter encoding, but cannot appear at the start of the program (as the encoding would look like leading zeroes and thus be ignored).
[Answer]
# [Perl 5](https://www.perl.org/) `-p`, score 251, 13 bytes
```
y/ycd\\\///cd
```
[Try it online!](https://tio.run/##K0gtyjH9/79SvzI5JSYmRl9fPznl/39FJWUVVTV1DU0tbR1dPX0DQyNjE1MzcwtLK2sbWzt7B0cnZxdXN3cPTy9vH18//4DAoOCQ0LDwiMio6JjYuPiExKTklNS09IzMrOyc3Lz8gsKi4pLSsvKKyqrqmto6rpzMvFQFo3/5BSWZ@XnF/3ULAA "Perl 5 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), score: ~~252~~ 253 (~~4~~ 3 distinct [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage) used; 8 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage) in total)
```
„ÃJ„„JJÃ
```
[Try it online.](https://tio.run/##DczBDcIwEETRVkZ7RhTiMw0syYRYCjayVwnckNwHzbiTNGJW@nrHn6veI8c4v7/eguuF0NsYtzVWeApjNVhGJREXHMSkCYXPvBPcWT62xvQA3xNfhiUX6LZBfCUXSG@uphkS5PoH)
**Explanation:**
```
„ÃJ        # Push the String "ÃJ"
   „„J     # Push the string "„J"
      J    # Join them together: "ÃJ„J"
       Ã   # Only keep these three characters from the (implicit) input
           # (and output the result implicitly)
```
Note that the order of `ÃJ` and `„J` in the 2-char strings are important, because `„` is also used for [dictionary words](https://codegolf.stackexchange.com/a/166851/52210), where every two characters is a dictionary word (except for a select few characters like letters, digits, `-`, and such). So `„JÃ` would be 'a word' `J`, as well as a dictionary word `Ã` + the next character (in this case `„`), [which apparently is the word `"causing"`](https://tio.run/##yy9OTMpM/f//UcM8r8PNQPL/fwA).
[Answer]
# Perl 5, score 251 (5 distinct bytes, 8058 bytes total)
```
s<><<s<>e<><s^^^<<s^^^<<s^^^<<s^^^<<s^^^<<s^^^<<s^^^^s^^^<<s^^^<<s>><><<s>>><<s>>><<s>>>^s>>><<s>>><<s>>><<s>>><<s>>>^s>>><<s>>><e^s<^>e>ee<e^<see><>>>>^<^^<se^e^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^e^^^^^^^e^^>^^^^s^s^ss>^<^^^^s^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^s^^^^^^^^^^>^<^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>^<^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^>>eeee^s<><<s<>e<><s^^^<<s^^^<<s^^^<<s^^^<<s^^^<<s^^^<<s^^^^s>><><<s>>><<s>>><<s>>><<s>>><<s>>>^s>>><<s>>><<s>>><e^s<^>e>ee<e^<see><>>>>^<^^<se^e^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^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uA5d4swVAliNX67T3wZRZ5TIIiT3laBq4GrQehOeOnZ3SN4nHCX3VHE5A@A4iyeeQ9CGLgF8I2z/UDd0EklExPEA5ZayynMSXUpPSmqiIOokNS2aYysESg7MLiyq1BGsnvRZP4LNGBlkBOOoj@ZO4kpojf4jlUi41EXrhA@dUktUgosxfruHwhuHYz3qyMP3/WefPh@D8P@vICgvvLT0KxGjgosDqZrwJpcZ0mEvUeEqxi/WsPrsojl51Mn15uLwb34fTs/OLq@vRzdPzyePxrb1cbh/sbxzu7G5uvQE "Perl 5 – Try It Online")
Uses the [`<>^es` Turing-complete subset of Perl](https://codegolf.stackexchange.com/a/124046/6484). The above code was obtained by running `print<>=~y<<>^es><>cdr` through [my converter](https://tio.run/##dVNNT@MwED2i5sofmA1eNeGjpkgrrTaOlSOXHvdEcNQGQytKGmLaUkH717tv4lRlV9qMFNsvb8Z@z5PaNvMf@/3ZtxoTuqrnQSBCSqlv@kkQvGzoe7l4sA7I6zpSpEgjDMIiHCIha2hE2tGElKETUlifYm3oHHNHt2Qxz3NS2tCKNFbxofR03HDpKOj1VZ9STX2njVa6fwlEd4gywEwLmSPJeJI9ItYj7og4j1x/4ShltW3R4ReeMaZDk@OmEIJ3h6@@4KrFjbLW4hwKyc4PFmymsz63nNC6Gdf0EfSgNcpaHy8pK/lr73HRUNTYlW2cJVHcXd9TuiM5kE8xZ3CKKGGNaNM@RLElZDzMLIW/q@dqsa6I3fuF3DABP2NyhJQBrg42vVOELemChnRFc1s9vU1RKyZJN3F82IoT/QZ3omgP4KSRouSVJD7i9WAgzkrmORndKX0f@7cUN2LoKccTgraFtOzQMS9QHypR6JBlMwhGY9@WTUWhU1p5EJ5ZCxFbb1q1fOk8ExMUWVb1uHymcPITVVqjkvZj1mCsl26K2SVrNrh4iFfKT99JXLGr6@lsbttS0DxkzUFvvijHcxRD@TBr2D8nc8PhpNbayYPXPnkjlZRo@43UGC/o5u8E1WbMHjtemv6X@A@zq8gn6lzZ7Y4t4Q2RubuQecXnzorOU7gj2l@nbYvPz7RttOg1ciq/PdcnMXyAi5EoePYanVjDfZuskiRHT7tbezoZjXSMRtzSYUPfD0FnSmH4frjD@S9w1rJKbnL@GdlgDt/0h8evdHeb@33dzKo3pdPdBroNrlnp8qH5Aw).
[Answer]
# [Octave](https://www.gnu.org/software/octave/), Score ~~248~~ 249 (50 bytes)
There *had* to be a better way... and there is!
```
@(a)a('l'=='a'==all('l'=='a'==(a==('@al()''=')')))
```
[Try it online!](https://tio.run/##TYexDYAwDATHeX/jDSxllSckNJZoItY3KSgo7k5396Vn1Ax3r2aiDIkIaEuZvzNt0JRGIECQrGnQ0c8xry9gvQ "Octave – Try It Online")
Filters out everything but `@al()'=`.
The `all` function is superior over `any`, because it only uses two distinct bytes. Note that `any(...)` is equal to `not(all(not(...)))`. So, we start with the program
```
@(a)a(~all(a~=('@al~()''=')'))
```
Instead of `~` (`not`) we can also write `0==`. Of course, that would mean we have to filter out `0` as well. Instead, note that the following expression is also false (zero)
```
'l'=='a'
```
---
If MATLAB compatibility is not an issue, I can go to 47 bytes
```
@(a)a((l='l'=='a')==all(l==(a==('@al()''=')')))
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), score 249, 16 bytes
```
{∈"{∈\\\"&}ˢ"&}ˢ
```
[Try it online!](https://tio.run/##SypKTM6ozMlPN/r/qG3Do6bG8v/Vjzo6lEBETEyMklrt6UVg4v9/pcTilDQ1tZKi1PKS8tSikiIlAA "Brachylog – Try It Online")
Not entirely sure how this works with the rules, what with Brachylog having [its own special code page](https://github.com/JCumin/Brachylog/wiki/Code-page) and all, but I can still explain how it works:
```
{                Start of inline predicate.
 ∈"              Input is a member of the string literal containing:
   {∈            the opening bracket, the member-of character,
     \\\"        backslash, quote,
         &}      ampersand, the closing bracket,
           ˢ"    and the superscript s.
             &}  Unify the input to the inline predicate with the output from the inline predicate.
               ˢ Output everything from the input that made it through the inline predicate.
```
[Answer]
# [Whitespace](https://web.archive.org/web/20150618184706/http://compsoc.dur.ac.uk/whitespace/tutorial.php), score: 253 (3 distinct bytes used, 97 bytes in total)
```
[N
S S N
_Create_Label_LOOP][S S S N
_Push_0][S N
S _Duplicate_0][T   N
T   S _Read_STDIN_as_character][T   T   T   _Retrieve][S N
S _Duplicate_input][S S S T S S T   N
_Push_9][T  S S T   _Subtract][N
T   S S N
_If_0_Jump_to_Label_PRINT][S N
S _Duplicate_input][S S S T S T S N
_Push_10][T S S T   _Subtract][N
T   S S N
_If_0_Jump_to_Label_PRINT][S N
S _Duplicate_input][S S S T S S S S S N
_Push_32][T S S T   _Subtract][N
T   S S N
_If_0_Jump_to_Label_PRINT][N
S N
N
_Jump_to_Label_LOOP][N
S S S N
_Create_Label_PRINT][T  N
S S _Print_character][N
S N
N
_Jump_to_Label_LOOP]
```
Letters `S` (space), `T` (tab), and `N` (new-line) added as highlighting only.  
`[..._some_action]` added as explanation only.
[**Try it online**](https://tio.run/##7ZLBCoMwDIbP@hQ@gttOO8@LQ6qoN5FQXYYF56S22@M7oxY2NoYMdpPQHvKn/xea3CuhsGt5iX2fMTtxEofZcJDIFULAC6whCMMoz0gZtUh3FbiUoHLwdFuLkqqHXGoxO7WGbIz8BEnq@Qx4B2XFJS8VSqqgGHQlBd7wg41oWq0Mj8zoNtw9OUwpSHShyDbPJujYnX8GF4760oK6zv1Hsc/SJSA6BrRx/0kyYWi77e80YjF7KHlVp6lNE32f6fyWPpZkiKRo1POcvrmum7JuyrJNeQA) (with raw spaces, tabs and new-lines only). A nice bonus is that I can use this code to transform the highlighted code above to the raw Whitespace program (which I did in this TIO as example), for which I usually use Notepad++. :)
**Explanation:**
Pretty straight forward. Here the pseudo-code:
```
Loop indefinitely:
  Character c = STDIN as character
  if(c == SPACE or c == TAB or c == NEWLINE):
    Print c as character
  Go to the next iteration of the loop
```
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), Score 245, 111 bytes
```
h=>h.Where(W=>W=='|'||W=='='||W=='>'||W=='h'||W=='e'||W=='r'||W=='W'||W=='\\'||W=='\''||W=='('||W==')'||W=='.')
```
[Try it online!](https://tio.run/##ZcjHUsMwFIXhPU9BlwyJ6dWWKCGBQGihiGKKolxHgkQB2aaaZzcwc1lxNt8/RyVllZiillkV1qs264GTrS6ESkvHS/8eHrNCM659ocEBFYwLxkhO8vxXhnJUo4A6VKBR9BcEg6Ie6hOvCAaEMynQJHXGdvxK3yqZ0pg2QbYbxgL1fhYUg0PDI6Nj44R6E5Olsj81PTM7N7@wuLS8shqEjK@tb2xWtqq17Z367l5j/@Dw6Lh5cnp2Li4ur66jm9u7e9lSbYg72jw8dnu2//TskjR7eX17//jMv74B "C# (Visual C# Interactive Compiler) – Try It Online")
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), Score 243, 33 bytes
```
n=>n.Intersect("Iter\\\"c=>n().")
```
Naive solution using `Intersect`
[Try it online!](https://tio.run/##ZchbXwFBGIDx@z6FljQrlqKTPeQQtYgiFIvGmGUcXszMlkqffe19z9Xz@xORIIL5ZQ@IYZfAW1GOx0tqkBnmVvyfWK7pg2mBZoOkXFAikWIH5ziOQgJHqqaovn7U5UxSJCRnMNWKayBYIhc1KZ7UGFCkBul@6FgJR06ip0iNncUTWjJ1fpHOXF5d39xmdcO07nL5QvG@VH54tCvV2lO98fzSbL22O923917fGQxHH3hMJtSdzth8sVzBerPlQnqfX7vvn9/93wE "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 12 bytes, score: 250
```
[^]n\\\n[^]
```
[Try it online!](https://tio.run/##K0otycxL/P8/Oi42LyYmJg9Ic6HyAA "Retina 0.8.2 – Try It Online") Filters out all characters except for newline, `[`, `\`, `]`, `^` and `n`. Although the characters `[\]^` are consecutive, using a range would actually cost a byte and also reduce my score.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 249 score, 20 bytes
```
f"[ fq\"[\\\\\\]]" q
```
[Try it online!](https://tio.run/##y0osKPn/P00pWiGtMEYpOgYMYmOVFAr//1cyNDa1MDSwNDUCAQUFC8OSwvzCwkyFtLS01PSM8piY1PT86NjoWCUA "Japt – Try It Online")
[Answer]
# Ruby `-paF[^$_=F*']`, score 250, 8 bytes
```
$_=$F*''
```
I'm not sure at all this is legal under the current site rules for command-line flags, since the "flag" here is sort of passing in code that includes forbidden bytes. The `F` flag defines an input separator regex consisting of all characters not in the code proper. The code proper sets the output to the concatenation of all input records.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `Dv`, Score 254, 4 bytes
```
‛↔‛↔
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=Dv&code=%E2%80%9B%E2%86%94%E2%80%9B%E2%86%94&inputs=%27Helloworld%E2%80%9B%E2%86%942345678%E2%80%9B%E2%86%94%27&header=&footer=)
```
‛↔‛  # Two-char-string '↔‛'
   ↔ # Remove characters not in said string
```
This *is* valid because of the `v` flag, which takes input as Vyxal encoding.
[Answer]
# PHP, score 234, ~~58~~ 62 bytes
```
<?=preg_replace("_[^\"$(),;<=?[\]^\_\\\\aceglnpr]_","",$argn);
```
Run as pipe with `-nF` or [try it online](http://sandbox.onlinephpfunctions.com/code/d1b00ccf72df48adaaeb948453b4457395110eea).
[Answer]
# [MATL](https://github.com/lmendo/MATL), Score 252
```
t't''m)'m)
```
[Try it online!](https://tio.run/##y00syfn/v0S9RF09VxOI/v9XT0xKTkksyVVTV1cHAA "MATL – Try It Online")
Explanation (for input `input`)
```
t         % Duplicate input. 
          % Stack: {'input', 'input'}
't''m)~'  % Push the string t'm)~ 
          % Stack: {'input', 'input', 't'm)~'}
m         % 'ismember' to filter
          % Stack: {'input', [0 0 0 0 1]}
)         % Index into input.
          % Stack: {'t'}
          % Implicit display.
```
[Answer]
# [brainfuck](https://github.com/TryItOnline/brainfuck), Score: 248, 162 bytes
```
,[>---[----------->--<]>-[>->->->-->------->-->-------[<<]>-]>--->-->->--->------------->->-----------[<]<<[->>>->->->->->->->-<<<<<<<<<<]>>>[>]>[[>]<[->-<]>.>],]
```
[Try it online!](https://tio.run/##VU5dDoJgDHv3KjBPsPQiyx74EUQQlB9BL4/7ogNtl2Vdl2Zpn1RtMWX1usYCIhLaYZoVZPsPQ7nho3A4Ufj2O/yl/GphZRYCPNTJG9RMgUKshdPwxBEaq/0YkSjjkKRZfirKc3Wpm2vb3e79ME6PeXm@3g "brainfuck – Try It Online")
Usually I don't answer my own questions, but people seem to have read my profle page, especially where it says `If someone comments on a question "I wish there was a brainfuck solution", I feel obliged to provide one.`
The bytes filtered out are `-<>[],.` and ignores the NUL byte, since it is indistinguishable from EOF. This is a bit longer than usual, since I'm deliberately avoiding using `+` to get a slightly better score. Even so, I might be able to golf the number generation part to save a few bytes.
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), score 249, 16 bytes
```
sf/"f/\"Tzs\\"Tz
```
Filters out every character except `f`, `s`, `T`, `z`, `"`, `/`, and `\`
[Try it online!](https://tio.run/##K6gsyfj/vzhNXylNP0YppKo4BkT@/5@YlJySmpaekZmVnZObl19QWFRcUlpWXlFZpaRuaGRsYmpmbmFpoBtvq61vH1MTHVtda22lY6NnBwA "Pyth – Try It Online")
[Answer]
## K, score 246, 23 bytes
`{x@&~x in"\"~ in@&{x}"}`
{..} is a lambda with arg x
read as 'returns x at where not x in string' 
String contains \"~ in@&{x} (the ten bytes used in the program)
[Answer]
# [sfk](http://stahlworks.com/dev/swiss-file-knife.html), score 239, 133 bytes
```
+xed -i -case ixixi x+x+x xexex xdxdx x-x-x xixix xcxcx xaxax xsxsx xbxbx xyxyx xtxtx x"x"x x\[x\[x x\]x\]x x\\x\\x "x x x" x[byte]xx
```
[Try it online!](https://tio.run/##HcrnVsMwDAXg3/AUl5bRYswotOy9955JAMdxITQEqENRWK8eZM53jyVZss1WUQgyEWQMqZU1iImBBAMZBooYSDK4Jb@agRQDWQYKGShnoIyBSgzkey5cAxeuvgvcik9AXphnJiAqRBKnJjEphDVZR7Xx32uVaEg31uoNWa7wZ7XA/VhtfKLemJyaHpXzvz1L5d6@2/7BSvVOdL19mHaWv8cvr17gH1@un5xdn28fHn39fHcrGzUfHp9ayezA8unaxubWzu7eTOmTdCdMn4eGR26uVi9WDvbnFhb/AA "sfk – Try It Online")
Performs replacements on the input (written as `[delim][from][delim][to][delim]`) changing all characters used in the program to themselves, which removes the character positions from consideration for input to the final replacement `x[byte]xx` which maps all bytes to the empty string.
]