[Question]
  [
**This question already has answers here**:
 
 
[Operation UnzÃñÃ¨ÃúÃ∫Ã¨aÕáÕñÃØÕîÕâlÃüÃ≠gÕïÃùÃºÕáÕìÃ™ÕçoÃ¨ÃùÕçÃπÃª](/questions/188472/operation-unz%cc%96%cc%ac%cc%9c%cc%ba%cc%aca%cd%87%cd%96%cc%af%cd%94%cd%89l%cc%9f%cc%adg%cd%95%cc%9d%cc%bc%cd%87%cd%93%cc%aa%cd%8do%cc%ac%cc%9d%cd%8d%cc%b9%cc%bb)
 (12 answers)
 
Closed 2 years ago.
Write a program or function that, given a string, will strip it of zalgo, if any exists.
## Zalgo
For this post, zalgo is defined as any character from the following Unicode ranges:
* Combining Diacritical Marks (0300‚Äì036F)
* Combining Diacritical Marks Extended (1AB0‚Äì1AFF)
* Combining Diacritical Marks Supplement (1DC0‚Äì1DFF)
* Combining Diacritical Marks for Symbols (20D0‚Äì20FF)
* Combining Half Marks (FE20‚ÄìFE2F)
<https://en.wikipedia.org/wiki/Combining_character#Unicode_ranges>
## Input
* May be passed via command line arguments, STDIN, or any other standard method of input supported by your language
* Will be a string that may or may not contain zalgo or other non-ASCII characters
## Output
Output should be a string that does not contain any zalgo.
## Test Cases
```
Input -> Output
HEÕ¶ÕöÃ∏ ÃìCÕâOÃóÕïÃÉMÕåÕôÕÜEÃãÃÉÕ•TÕåÃ†ÕïHÃ§ÃØÕõ -> HE COMETH
CÕâÃäodÃìeÕîÕù ÃÜGÕÄÃëÕßoÕúlÕîÃØÕäfÕâÕç -> Code Golf
aaaÕßÕ©aÕïÃ∞aÃòÕïÃëaaÕùÕ¢ÃöaaÕóÕ¢Ãø -> aaaaaaaaa
√±nÃÉ        -> √±n
‚ö°‚É§       -> ‚ö°
```
## Scoring
As this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shortest answer in bytes wins.
  
[Answer]
## [Retina](https://github.com/m-ender/retina), 35 bytes
```
T`ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø
```
[Try it online!](https://tio.run/nexus/retina#DcxBCoJQAIThvafwAu8UIbmJNh6gB9Uq8AqCIGgGiYplCRKVVAvd6c4LzBxCL@AR7K0@GH5mtjZwBOvh24jh1w@tI4a2H92zGN1@6koxdfU8mwbfzNHpiBf018iYwl0x5JWegSNcviyGKJmaeKLmTVMZAnuLeMeEhQ5vSQcRK5v3AxOVBHv6PGlSSlb8SHXYSFwUkVoKPpArM2X/Bw "Retina ‚Äì TIO Nexus")
Simply removes all characters in the ranges given in the challenge from the input. The code is super unreadable of course, but the code is conceptually no different from something like `T`0-9A-Za-z` which would delete all alphanumeric characters.
[Answer]
# [Python 3](https://docs.python.org/3/), ~~73~~ 69 bytes
*-4 bytes thanks to L3viathan.*
Not sure if participating in your own challenge is ok or not but... Stole the regex ~~and essentially the idea as well ><~~ straight from the JS and Retina answers.
```
lambda s:re.sub('[ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø]','',s)
import re
```
[Try it online!](https://tio.run/nexus/python3#VY29asJQAIV3nyLbTcDrAxQ6FalLcXFrHa6YgKBGEt0DFwR/ChUVW1tBSltpO8ROZsvQ9ZyHiC/gI6R3Kjh98HE@jnd5l7dVp9FUVngRuKVw0LDFLSLJOPvay@w7zQ6RzA7pUT/Io05PyVaekrguikIUQ6fQ6vT8oG8Fbt4LWt2@7dmiUuYH10gszK84qmLFJfQNp3zisIwJNN9rnGLLZQVviPksHKfwX5sEY7@JucsFNxaG14ww487nS5sLMx97HPH@rFFKccdPZY72Co8GM2M2fMXacGWYnu1/f7rQxuR/ "Python 3 ‚Äì TIO Nexus")
[Answer]
## JavaScript (ES6), 55 bytes
```
f=
s=>s.replace(/[ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø]/g,'')
```
```
<textarea oninput=o.textContent=f(this.value)></textarea><pre id=o>
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 37 bytes
```
r"[ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø]
```
[Try it online!](https://tio.run/nexus/japt#AVwAo///ciJbzIAtza/hqrAt4au/4beALeG3v@KDkC3ig7/vuKAt77ivXf//IkhFzabNmsy4IMyTQ82JT8yXzZXMg03NjM2ZzYZFzIvMg82lVM2MzKDNlUjMpMyvzZsgIg "Japt ‚Äì TIO Nexus")
[Answer]
# PHP, 67 Bytes
shorter as the write out
```
<?=preg_replace("#[ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø]#u","",$argn);
```
[Try it online!](https://tio.run/nexus/php#JYxBS8JgHIfv@xTjtYOB@wRaO4QoQXTpphIv63U7yDYWnSIYDATNIFGxLEGikvIwu@RuO3j9/z7E/AJ@hPWHTg88PDwV03d8re0FSlpOsSHqVXxiRolOoxP0zmmKCUVnGOAZ3SrdU4SPCwxogUmd3inGiygJDqnvXdFIYYy5Tt0aQhpi6eG1gzFH/TZ6eNA5lVJiiS/J17WkJ8aQzRxvNGNOmSlXp9vfwGZuf1yKREteH8jAdg9vNfM4r5hHfqDsy0D5HWmpoig0KDQQZ99rI1ul2SY0sk26ix6NXZTuk4WxT@JW4YZvovS/KefKcjzRdJuuKGt3@R8 "PHP ‚Äì TIO Nexus")
# PHP, 115 Bytes
```
<?=preg_replace("#[\u{300}-\u{36f}\u{1ab0}-\u{1aff}\u{1dc0}-\u{1dff}\u{20d0}-\u{20ff}\u{fe20}-\u{fe2f}]#u","",$argn);
```
[Try it online!](https://tio.run/nexus/php#LY0xS8NQEID3/Irw6lChQhrBpdUMUiyCuLg1Rc7kvWQoSYh0KgEhUGitQ2lLtVoQ0ZZO6iJuDl3vflM8eU7f3cfHXd1JwsRQcSrBC8st0WzQihb4beLkmAbnOKcZ5mc0ogfqN/AWc3q7oBE@06yJr/hOj6IiOMRh7ONE0pSWJvZP6AbHtI7pqUNTjoaKBnRncgoAtKYN8NUPwHvGmM2SXnDBnDN/uDrdfqUBc/sZYS7acL0DaRDt9gznqKg7h0kqg8tUJh3wZFmUWm63t29Z2d4fD1TGqMKV3qugtPC9f@FrYVu@FralhZK2FjyorF3q8n9R0Y9rhfTCWLiRG4makRW/ "PHP ‚Äì TIO Nexus")
# PHP, 35 Bytes
Valid for the given Testcases it removes all Marks
```
<?=preg_replace("#\pM#u","",$argn);
```
[Try it online!](https://tio.run/nexus/php#JczBSgJRFMbx/TzFcG1hYE@gNYsQRZA27ZqIw3SdWcjcy41WEQQDkmYLUbGmhAxLWlmbaNfC7flewheZDrT68x1@nFpgE@t1jNMUJeUT1azjHTn/@Dw@RP@IZ5hy1sYQj@jV@Y4zvB1jyC@YNnnJazypihLIA3POY40J5j73GrjhEVYGz11MBA066OPeF0pEWOGD5Osn8YNkJJc5XjmXzqS/olqbbxfvtQzfuljm5ivlTLrNF9tsqU7pYodcnO5eecFBUQv2rdPxmdO2S5Euq1Jo26VL4aryz6qFjhKjwjRMVdW7Lv4A "PHP ‚Äì TIO Nexus")
[Answer]
# Python 3, ~~127~~ 118 bytes
Just a straightforward answer for now, let's see how golfable it is.
```
lambda y:"".join(chr(x)for x in map(ord,y)if not(767<x<880or 6831<x<6912or 7615<x<7680or 8399<x<8448or 65055<x<65072))
```
Changelog:
* When will I ever learn that comprehensions are shorter than functional stuff (-9 bytes).
[Answer]
# Bash + coreutils, 41
```
tr -d 'ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø'
```
Simply strips out characters in the given ranges.
[Try it online](https://tio.run/nexus/bash#PY5PasJQEMb3OcXwaHH1rtCNSN2UbnqBh3mhQskrSZZdBAKC1oKi4p9WkNJW2i7izuxygfkOES/gEeJQsLP5wTc/vhkvcBElNk46JrbUDUm1W/jCigviSRP9W55jxtkNhlii1@JnzvB5hyFvMGvzB@d4VaRE5IHzeWIxxZq4d42Ux9g6vD1gKtIgQB8vYhpjsMW3kdKd4YVgLMka77wSzoWl8nznkcxj1A2TgNRlTPqKFF2c//zb2s69I/WfKXqqk4i0Tw1ONfLqZ6er37Lap7ral4dspA9ZeSw2@ljkjfpcIKdCW58A).
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 43 bytes
```
'[ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø]'‚éïR''
```
[Try it online!](https://tio.run/nexus/apl-dyalog#Fcw9qsJAGIXh/q4i3VSzCpFrI4LYicWAWolCVhAYCPiLokGNCir@oBbRynQpbM9ZRGYDLiFOqvfw8fBlrvGnog5PMkrvT5k@kvTtyfSdGD2VRiffeC@/cdQQZhJUhcgyV5SKvDBE7GBeYL@CJQPoMkdc0y9iCM1zjSPsGZRwQsSN@HOFlRj0mpi3uODOgf9PDzNee9x2uLBq0Gaf45wqpXjlTdm3T4WVzcxedjwitF3aJjn7vLrQ@TDhweiTI34 "APL (Dyalog Unicode) ‚Äì TIO Nexus")
PCRE **R**eplace all those with nothing
---
44 byte version not using RegEx or strange character literals (and thus single byte per character):
```
‚çû~‚éïUCS‚àä65055 8399 7615 6831 767+‚ç≥¬®16√ó2 6~‚ç®‚ç≥7
```
[Try it online!](https://tio.run/nexus/apl-dyalog#DYy9asJgGIX3XMW3u5hKvugcRJfiUL2AD7RTaSAXIIWAxtQIoiEaa2mL9Weq4uIm1PU9N/HeSHyn55zDw@FoGBScfPZ5kna8J45i7ZQdR1UrtZpyte0oXa3YktwSJ@f/va1v2YPSfU720t2Co2ERWM06tsjpomjmYdSiDCmFjxhjiUGd3inEbxtj@kLapA39YWUFlogU@12a9TDHWtGggTeaYufj4wVzkeJnjJCIaYzBDgcjp0dDC8FUljV@KBdmwqtYt9MrhULOvzncqDs "APL (Dyalog Unicode) ‚Äì TIO Nexus")
`‚ç≥7` 1‚Ä¶7 (1 2 3 4 5 6 7)
`2 6~‚ç®` except 2 and 6 (1 3 4 5 7)
`16√ó` multiply by 16 (16 48 64 80 112)
`‚ç≥¬®` 1‚Ä¶ each (1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16, 1 2 3‚Ä¶, ‚Ä¶110 111 112)
`+` add offset to each list (65056 65057 65058‚Ä¶, ‚Ä¶877 878 879)
`‚àä` enlist (flatten)
`‚éïUCS` convert to corresponding Unicode character
`‚çû~` get text input and remove all such characters
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 32 bytes
```
‚Äú≈ª»∑'‚Å∫¬¶60∆≠·πñ_WT…¶7·ª§|·π´Y…†F‚Äôb»∑5r2/F·ªå·∏ü@
```
[Try it online!](https://tio.run/##AXQAi/9qZWxsef//4oCcxbvItyfigbrCpjYwxq3huZZfV1TJpjfhu6R84bmrWcmgRuKAmWLItzVyMi9G4buM4bifQP///yJIRc2mzZrMuCDMk0PNiU/Ml82VzINNzYzNmc2GRcyLzIPNpVTNjMygzZVIzKTMr82bIg "Jelly ‚Äì Try It Online")
# Explanation
```
‚Äú≈ª»∑'‚Å∫¬¶60∆≠·πñ_WT…¶7·ª§|·π´Y…†F‚Äôb»∑5r2/F·ªå·∏ü@  Main link
‚Äú≈ª»∑'‚Å∫¬¶60∆≠·πñ_WT…¶7·ª§|·π´Y…†F‚Äô            Base 250 compressed integer; 768008790683206911076160767908400084476505665071
                      b»∑5         Convert into base 100000; [768, 879, 6832, 6911, 7616, 7679, 8400, 8447, 65056, 65071]
                         r2/      Inclusive range on non-overlapping slices of length 2
                            F     Flatten
                             ·ªå    chr; cast to character from codepoints
                              ·∏ü@  Filter; remove all characters from input that are in the characters generated before
```
[Answer]
# Java 8, 57 bytes
```
s->s.replaceAll("[ÃÄ-ÕØ·™∞-·´ø·∑Ä-·∑ø‚Éê-‚ÉøÔ∏†-Ô∏Ø]","")
```
[Try it here.](https://tio.run/##hY/PSgJRFMb3PcVhVjPQzAtIQYTkRlvUTlzcxjHGxjuDMwoRgjAgaAaJimUJFpZUC22lu1m0PechZl7AR5huNdsQzuU79/z53e@WWZ2ptmPwcvEi1i3mupBlJr/aATC5Z1RLTDcg93MFOPGqJj8HXU4SV0mJekMcEa7HPFOHHHDYg9hV912tajiWWD@wLFnKY1OlRfi@VMOPIFw11XAVRP6tGvnBZj1VN@tFQdqVJCVO/eGc2pklcAm1bptFqAhfydP5AjAlMXXpekZFs2ue5oiWZ3GZa7osZdL0SmNcA/YPqX2MIxqin6Uu3VMrjdfo08spdXFKwwzOcEEPkvL7nf@JAoMdu4h9gwY0AWwdURN7NLfp0aKBQHRK1KabrRzGGM3pjQlDS4Z3QnqiMqFnHAsdCQ22Mr4@Ofpbp6LxU@TPkrHGTiP@Bg)
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 32 bytes
```
‚Ä¢3xIŒ±EŒª¬§‚Äô√§‚ÇÜƒÜk–º–º`0√Ç9"¬¥‚Ä¢≈æH–≤2√¥vy≈∏√ßK
```
[Try it online!](https://tio.run/##AWcAmP8wNWFiMWX//@KAojN4Sc6xRc67wqTigJnDpOKChsSGa9C80LxgMMOCOSLCtOKAosW@SNCyMsO0dnnFuMOnS///Q82JzIpvZMyTZc2UzZ0gzIZHzYDMkc2nb82cbM2UzK/NimbNic2N "05AB1E ‚Äì Try It Online")
]