[Question]
  [
Given a non-empty string consisting of only lower and upper case alphabetical characters and spaces (`[a-zA-Z ]`), reduce it to a snippet of the alphabet, starting with the first character.
To reduce a string, begin with the first alphabetical character, then remove every character after it that is not the next letter of the alphabet. Continue doing this until you reach the end of the string.
For example `codegolf`:
Begin with `c`, remove `o` as it is not the next letter of the alphabet.  
Keep `d` as it *is* the next letter of the alphabet, and keep `e` as it is the next letter too.  
Remove `g`, `o`, and `l`, and keep `f`.
Your final snippet would then be `cdef`
## Rules
* Capitalisation should be maintained, so `CodEgolF` would result in `CdEF`
* Space is not a letter of the alphabet, and thus should always be removed, even if it is the start of the string
* Due to the nature of the reduction, the first alphabetical character of the input will *always* be the first character of the output.
* `zZ` is the last letter of the alphabet. There are no letters after it, the alphabet does not loop.
## Test Cases
```
codegolf -> cdef
CodEgolf -> CdEf
 codeolfg -> cdefg
ProgrammingPuzzles -> P
Stack Exchange -> St
The quick red fox jumped over the lazy brown dog -> Tuvw
Zebra -> Z
Abcdegfhijkl -> Abcdef
```
## Scoring
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so fewest bytes **in each language** wins!
  
[Answer]
# JavaScript (ES6), ~~66~~ ~~79~~ ~~68~~ 67 bytes
```
f=([c,...s],p)=>c?(p?~parseInt(c+p,36)%37:c<'!')?f(s,p):c+f(s,c):''
```
### How?
**Testing consecutive letters**
Because converting two characters to their ASCII codes would be a rather lengthy operation in JS, we use the following formula instead:
```
~parseInt(b + a, 36) % 37
```
Provided that both ***a*** and ***b*** are in `[a-zA-Z ]`, the above expression equals `0` if and only if ***a*** and ***b*** are consecutive letters (i.e. consecutive digits in base 36), no matter the case of the characters.
For instance:
```
~parseInt("Y" + "x", 36) = ~(36 * parseInt("Y", 36) + parseInt("x", 36))
                         = ~(36 * 34 + 33)
                         = -(36 * 34 + 33 + 1)
                         = -(37 * 34)
```
**Formatted and commented**
```
f = ([c,                              // c = current character
         ...s],                       // s = array of remaining characters
                p) =>                 // p = previous matching letter
  c ? (                               // if there's still at least 1 character to process:
      p ?                             //   if p was already defined:
        ~parseInt(c + p, 36) % 37     //     test if p and c are NON-consecutive letters
      :                               //   else:
        c < '!'                       //     test if c is a space character
    ) ?                               //   if the above test passes:
      f(s, p)                         //     ignore c and keep the current value of p
    :                                 //   else:
      c + f(s, c)                     //     append c to the final result and update p to c
  :                                   // else:
    ''                                //   stop recursion
```
### Test cases
```
f=([c,...s],p)=>c?(p?~parseInt(c+p,36)%37:c<'!')?f(s,p):c+f(s,c):''
console.log(f("codegolf")) // -> cdef
console.log(f("CodEgolf")) // -> CdEf
console.log(f(" codeolfg")) // -> cdefg
console.log(f("ProgrammingPuzzles")) // -> P
console.log(f("Stack Exchange")) // -> St
console.log(f("The quick red fox jumped over the lazy brown dog")) // -> Tuvw
console.log(f("Zebra")) // -> Z
console.log(f("Abcdegfhijkl")) // -> Abcdef
```
[Answer]
# [Python 2](https://docs.python.org/2/), 69 bytes
```
lambda s:reduce(lambda x,y:x+y*((ord(y)-ord(x[~0]))%32==1),s.strip())
```
[Try it online!](https://tio.run/##LY/LTsMwEEXX8BWzqWzTtIJ2FylICHVfCVaULhw/EreJJzgOJKnKr4cJ6ureOSONzjRDLNFvJpt9TpWscy2hTYPRnTL8NvfJkPbL4YFzDJoPYjVHf/h9PAqx2G6y7Ekk7bqNwTVciMliACVbA87DgSnUpsDKsoS9ot7dKsyYakF9H7AIsq6dL/bdOFamJfgWpTrDrlel9IUh8F4a@OocQZIDiz2curqhit8mQKRtJccB8oA/HjTOhz9MHiTlS67IwZbudK7YMb2/a4LzEdjlCqtnuFzZmpRrGflsndj/oD/@AA "Python 2 – Try It Online")
A simple reduction of the string. We simply concatenate the next character if and only if `(ord(y)-ord(x[~0]))%32==1`. Very ugly check - I am sure it can be improved, but I'm not sure how!
[Answer]
# [Python 3](https://docs.python.org/3/), ~~75 85 84 91 81 77~~ 75 bytes
I think this is as short as it can get in [Python 3](https://docs.python.org/3/). It can be shortened by a few bytes in Python 2, as shown in [Sisyphus' submission](https://codegolf.stackexchange.com/a/139416/59487).
* **EDIT:** +10 for fixing a bug
* **EDIT:** -1 by fixing another bug
* **EDIT:** +7 for fixing another bug
* **EDIT:** -10 bytes with help from [@Ruud](https://codegolf.stackexchange.com/users/55844/ruud)
* **EDIT:** -4 bytes since the OP allowed us to output the letters separated by a newline
* **EDIT:** -2 bytes thanks to [@Ruud](https://codegolf.stackexchange.com/users/55844/ruud), back to the original byte count!
```
s=input().strip();k=0
for i in s:
 if(ord(i)-ord(s[0]))%32==k:k+=1;print(i)
```
[Try it online!](https://tio.run/##FcmxCoAgEADQva@4JfCIonIzbmroI6KtpMPwRG3o662mN7zw5FO8LiUR@3BnhV3KkYPCyVFfWYnAwB6SqYCtkrgrxvYnrf2GWOuRyBnX0DCFyD5/XQrMsh@LXPYF "Python 3 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 13 bytes
```
áćsv¤yìuÇÆiy«
```
[Try it online!](https://tio.run/##AScA2P8wNWFiMWX//8OhxIdzdsKkecOsdcOHw4ZpecKr//9BQiBBQyBHREU "05AB1E – Try It Online")
-1 thanks to [Adnan](https://codegolf.stackexchange.com/users/34388/adnan)
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 15 bytes
```
;ṢxS⊇.ḷ~sẠ∧Sh~h
```
[Try it online!](https://tio.run/##ATQAy/9icmFjaHlsb2cy//874bmieFPiiocu4bi3fnPhuqDiiKdTaH5o//8iIENvRGVvbGZnIv9a "Brachylog – Try It Online")
This would be 10 bytes: `⊇.ḷ~sẠ&h~h`, if it weren't for the fairly uninteresting "strings can start with spaces" constraint.
### Explanation
```
;ṢxS               S is the Input with all spaces removed
   S⊇.             The Output is an ordered subset of the Input
     .ḷ            The Output lowercased…
        ~sẠ          …is a substring of "abcdefghijklmnopqrstuvwxyz"
           ∧
            Sh     The first char of S…
              ~h   …is the first char of the Output
```
Since this is fairly declarative, this is also really slow.
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~18~~ ~~16~~ 15 bytes
*Thanks to [Mr.Xcoder](https://codegolf.stackexchange.com/users/59487/mr-xcoder) for pointing out a mistake, now corrected*
```
Xz1&)"t@hkd1=?@
```
Letters in the output are separated by newlines.
[Try it online!](https://tio.run/##y00syfn/P6LKUE1TqcQhIzvF0Nbe4f9/9ZCMVIXC0szkbIWi1BSFtPwKhazS3AIgM78stUihBCibk1hVqZBUlF@ep5CSn64OAA) Or [verify all test cases](https://tio.run/##LY5BCsIwFET3nuLjwuCyBxAr2n2hXYhQME3SpG3SrzHVmsvHX3A1jzcwjOPBpnu6xmy334bcjDI7HPNkmuZSJyZQKo22Yxt2Rln8EVZNqIlLj9pz5/pJl3OMVr1IVoGLEYpFGD5pRaI2Cp5zT9IrCR0uMMzuQYhv5SFQa3n8QuvxM4HEdfimWs8pT62gD53ph9GyHw) (the footer code displays all output letters on the same line for clarity).
### Explanation
```
Xz       % Implicitly input a string. Remove spaces
1&)      % Push first character and then the remaining substring
"        % For each
  t      %   Duplicate previous character
  @      %   Push current character
  h      %   Concatenate both characters
  k      %   Convert to lowercase
  d      %   Consecutive difference. Gives a number
  1=     %   Is it 1?
  ?      %   If so
    @    %     Push current char
         %   End (implicit)
         % End (implicit)
         % Display stack (implicit)
```
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), ~~102~~ ~~101~~ 74 bytes
```
s->{char c=0;for(char x:s)if(c<1&x>32|~-x%32==c%32)System.out.print(c=x);}
```
[Try it online!](https://tio.run/##nZPJTsMwEIbvfYpRJVAiUYfl1pBKqOoRqBROIA6ul9SpYwcvJS2UVy9uKCARDpQ5ePen3zP@S7zEA10zVdLFtvYzKQgQia2FaywUvPQghHXYhXUuFJZQhhvIOyER94o4oRUaa2V9xcwlmWPz8DiCG8i2djB62c2BZKcp1yZqJ83QxoJH5PLsuBldnL@@DZqji/MsI6GN85V1rELaO1QboVxEsiZON9u018rYy9urWWpBoQoio9yFw8XDI2BT2HiveRffUq0zDFco/@g0j77OfEafaMoKLXn/BA6JJCGU8S5urOnkX7gxnfyCg528gCsO432oK7q8qdGFwVUVEjf167Vk9k/gJJl2WbnDZAGTJhRYFezPApMkd13Y3ZzBkxcBaBgFrhsofVWHoV4yAy7sSrxewczoZwVUf@YjSe788rmLu2czgw@sQYu777KuZiGZBZ@LciH7h7Dai99FjVGF6/2vHQ6dHgdjXBmDVzEKPplgMr81lIXnRzsP3SBMCKtdZOP0p0GkioI/4rRFb3qb7Ts "Java (OpenJDK 8) – Try It Online")
-27 bytes thanks to @Olivier Grégoire
[Answer]
# PHP, 64+1 bytes
```
while($c=$argn[$i++])$c<A||$n&&($c&_)!=$n||(print$c)&$n=++$c&__;
```
Run as pipe with `-nR` or [try it online](http://sandbox.onlinephpfunctions.com/code/008e175f745bc3de2c439e17917ace212eab378f).
---
Apart from the usual tricks: When `$c` reaches `Z`, `++$c` results in `AA`,  
and `&__` keeps that length untouched; so `$n` will match no further `$c`.
[Answer]
# [Pyth](https://pyth.readthedocs.io), ~~23 22 21~~ 20 bytes
-1 byte indirectly thanks to [@Erik the Outgolfer's trick (`-Qd`)](https://codegolf.stackexchange.com/a/139418/59487).
-1 byte thanks to @Erik the Outgolfer.
```
VQIqZ%-CNCh-Qd32N=hZ
```
**[Try it here.](https://pyth.herokuapp.com/?code=VQIqZ%25-CNCh-Qd32N%3DhZ&input=%22+CodeGolf%22&debug=0)**
[Answer]
# Haskell, ~~106 105~~ 97 bytes
```
import Data.Char
import Data.List
z=ord.toUpper
a%b|z a+1==z b=b|0<3=a
nub.scanl1(%).filter(>' ')
```
*I tried to use `fromEnum` + char arithmetic instead of importing `Data.Char`, but that ended up being longer...*
Saved 8 bytes thanks to H.PWiz!
[Try it online.](https://tio.run/##ZZBdS8MwFIbv8ytegmLLdCjeDTPQOUEcOJjeeOVJm364tKlp6rTsv884ta7uXITDeZ@85yOjeqm03mzyojLW4ZocDScZWbZbmOW1Y60wNh4681hVyjI6lOsWNDgTooUUcn16cS6IJaJs5LCOqNRnwWE4THLtlA3GRzgKN3VmGh1fKYxGCKavoGMsMrMChRBjEE5@ntt7BCEjPP9@eIbEGiSExDYEqsYtnJ2V4Pd3nKEfaxiXKbvKa7WLHoDfXN7ORuAYDBDUP619zvHdCVLtijJkrKC89CaxYdsuCXhkYpUanfDd@XgUq4T/IhMTT/eRSTz9Q/Bl45F03ybtoLk1qaWiyMt03rStVnWfnnfkwlG0xPQ9yqhMVZ9auA57yBRem9yjVsVIzDtemqLyqXlTFv5o0NR@QFqzKv3O/4Z7aN5WndWTkpb6@lMnXkq/SJpk@ctS95mt4s@w@QQ)
[Answer]
# Pyth, ~~21~~ ~~20~~ 18 bytes
```
ef&qhThQhxGrT0tyr6
```
[Try it here.](http://pyth.herokuapp.com/?code=ef%26qhThQhxGrT0tyr6&input=%22codegolf%22&debug=0)
Way more efficient 20-byte version:
```
.U+b?t-CrZ1Creb1kZr6
```
[Try it here.](http://pyth.herokuapp.com/?code=.U%2Bb%3Ft-CrZ1Creb1kZr6&input=%22The+quick+red+fox+jumped+over+the+lazy+brown+dog%22&debug=0)
-1 thanks to [Mr. Xcoder](https://codegolf.stackexchange.com/users/59487/mr-xcoder) (indirectly).
[Answer]
# [C# (Mono)](http://www.mono-project.com/), ~~129~~ ~~107~~ ~~93~~ ~~91~~ ~~87~~ 86 bytes
```
s=>{var r=s.Trim()[0]+"";foreach(var c in s)if(r[r.Length-1]%32==~-c%32)r+=c;return r;}
```
*Saved 2 bytes thanks to @Mr. Xcoder.*  
*Saved 4 bytes thanks to @jkelm.*  
[Try it online!](https://tio.run/##fdDBasJAEAbge55iyKEkWKXSW2MsRezJgqBQqHjYbCbJarLTzm6sRtJXT1d7bTztsP@3y8xIM6xIU1cbpXNYnYzFKvI8WQpjYOmdPWOFVRIOpFJ4E0oHobt8rbWcGMvuzT38nVPIIO5MPD0fBAPHZrRmVQXh5mE78P0oI0Yhi@ASSlAaTMhx8MMbHi1Q57YYjrcDefc4DifjZx7IJ44Ybc0aOGo719GMtKESR@@sLC6UxiALfEkp5lRmfhhG/4sZpfPbAi6fOJH3kyVTzqKq3JjLumlKNP12ZYXcw/woC6Fz7HfrAuGrVs4yppDREXZ19elKOiCDdWkpmhMkTN8aUrrR3QcmLPrjl0S6JWWF2u3Lq/Jar@1@AQ "C# (Mono C# compiler) – Try It Online")
[Answer]
# [Perl 6](https://perl6.org), 51 bytes
```
{S:i:g/\s|(\w){}<([<!before "{chr $0.ord+1}">.]+//}
```
[Test it](https://tio.run/##VY7NbsIwEITvfopthNpEQGgvHAigVog7EpwoPST2xjEkcWo7/KV5st76YqkDpWpvuzPfzmyBKh02pUbYD30akOwE9wpZSbGvjRI5h0lTLUdixAcb/eFuDl5Vj93X8V2EsVQITkUTBZ1HXyrWfaqdqf/WHQzqxuY8G9QGJpCKHLXrfX36ukiFcR@gP4UHLyBt68oyASnSMIfu5SAgNvfn1nIudERelKYHHTwWSA0y8KAiAELDv0fdK@j9IXvgXMU26Vd1SN1QyZDLNG4NyjAmM8nmN2HG5jGBFrECvyGcLJTkKswyW7Yoz@cUdestyNKEdAfzI03CnGOrLQ1ZJQjvpbCG/RJieYRtmRV2lHtUYKybhucTREoecmDyUrMq9weyxkiF7bYmL5Et5nEitru0VS57/A0 "Perl 6 – Try It Online")
## Expanded:
```
{  # bare block lambda with implicit parameter $_
  S                          # substitute implicitly on $_, not in-place
  :ignorecase
  :global
  /
    |  \s                    # match any space
    |  (\w)                  # match a word character
       {}                    # make sure $/ is updated (which $0 uses)
       <(                    # ignore everything before this
       [
           <!before "{       # make sure this won't match after this point
             chr $0.ord + 1  # the next ASCII character
           }">
           .                 # any character
       ]+                    # match it at least once
  //                         # remove what matched
}
```
Note that `<!before …>` is a zero width assertion
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 17 bytes
```
ḟ⁶;ð,ŒuṪ€O_/⁼-ð¡/
```
[Try it online!](https://tio.run/##y0rNyan8///hjvmPGrdZH96gc3RS6cOdqx41rfGP13/UuEf38IZDC/X///8fkpGqUFiamZytUJSaopCWX6GQVZpbAGTml6UWKZQAZXMSqyoVkoryy/MUUvLTAQ "Jelly – Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~18~~ ~~17~~ 16 bytes
*Saved 1 byte thanks to @Shaggy*
```
x
c
Çc %H¥V%H©V°
```
[Test it online!](http://ethproductions.github.io/japt/?v=1.4.5&code=eApjCsdjICVIpVYlSKlWsA==&input=IiBjb2Rlb2xmZyI=)
Was thinking this would be a good bit shorter, but... Such is life...
### Explanation
```
x    First line: set U to the result.
x    Trim all spaces off of the input. Only necessary to remove leading spaces.
c    Second line: set V to the result.
c    Take the charcode of the first character in U.
 Ç   c %H¥ V%H© V°
UoZ{Zc %H==V%H&&V++}   Final line: output the result.
UoZ{               }   Filter to only the chars in Z where
    Zc                   the charcode of Z
       %H                mod 32
         ==V%H           equals V mod 32.
              &&V++      If true, increment V for the next letter.
```
[Answer]
# [C# (.NET Core)](https://www.microsoft.com/net/core/platform), ~~70~~ 60 + 18 bytes
*-10 bytes thanks to [TheLethalCoder](https://codegolf.stackexchange.com/users/38550/thelethalcoder)*
```
a=>{var c=a.Trim()[0];return a.Where(x=>x%32==c%32&&++c>0);}
```
Byte count also includes:
```
using System.Linq;
```
[Try it online!](https://tio.run/##XVDBThsxED3jrxgORbagK9Qew66EolBVohIqkZCKODizs7sGrx3GdghB@fbUm4Wg9h1GT2/seW8Gw1f0TLsUjGvh9jVE6otr454nQjjdU1hqpA996q0ljMa7UPwgR2xQvAnIQKtDgMs9H5UBIepoEFbe1PBLGyfVofX5aMBVcngRIucMZ/Bz5lJPrBeWLrDTXFXQQLnTZfW20gxY6mLOppfq/vxhwhQTO9DFXUdMcl1W6y/fv5Ul5npycnqK1bmabHcTcTQGGizAuGWK79JLZyxJuZeghGnezVsqfpOu8xlIKgXHJbhkrfov9IBm/KiKub82IUpVXHmeaewkQlkdpt2xiSRRqWx69I84erxn2R7mj2wrtjv0NbXeNmLq69mewCBl0oob9i3rvs873aTNxlIQt1HjE8zW@XCuJTHvCJ6TyRJTDY1fw2Pql5n6FTHE3LV68woL9i8Oat@KP7RgLS4XmF2bzjw@2b8 "C# (.NET Core) – Try It Online")
1 byte longer ~~(currently)~~ (not anymore) than TheLethalCoder's so posting for the sake of fun. Different approach, with LINQ.
This takes advantage of two C-like features in C# - a character `char` variable is implicitly behaving the same as an integer `int`, and boolean AND operator `&&` doesn't execute right operation if left returns a `false`. Code explanation:
```
a =>                                  // Take string as input
{
    var c = a.Trim()[0];              // Delete leading spaces and take first letter
    return a.Where(                   // Filter out characters from the string, leaving those that:
               x => x % 32 == c % 32  // it's the next character in alphabet case-insensitive (thanks to modulo 32 - credits to previous answers)
               && ++c > 0             // If it is, go to the subsequent character in alphabet (and this always has to return true)
           );
}
```
[Answer]
# q/kdb+, ~~47~~ 45 bytes
**Solution:**
```
{10h$({(x;x,y)1=mod[y-last x;32]}/)7h$trim x}
```
**Examples:**
```
q){"c"$({(x;x,y)1=mod[y-last x;32]}/)7h$trim x}"CodEgolf"
"CdEf"
q){"c"$({(x;x,y)1=mod[y-last x;32]}/)7h$trim x}" codeolfg"
"cdefg"
q){"c"$({(x;x,y)1=mod[y-last x;32]}/)7h$trim x}"ProgrammingPuzzles"
"P"
q){"c"$({(x;x,y)1=mod[y-last x;32]}/)7h$trim x}"The quick red fox jumped over the lazy brown dog"
"Tuvw"
```
**Explanation:**
Leveraging the `mod 32` trick from existing solutions along with [converge](http://code.kx.com/wiki/Reference/Slash) function. Iterate over the string, if the difference between the last element of the result (e.g. starts with `T` for "The quick red fox...") and the current character is 1 (after being `mod`'d with 32), then we add this to the result (hence taking why we take `last x`), then cast everything back to a string.
```
{10h$({(x;x,y)1=mod[y-last x;32]}/)7h$trim x} / the solution
{                                           } / lambda function
                                      trim x  / trim whitespace (leading/trailing)
                                   7h$        / cast string to ASCII (a -> 97)
     ({                         }/)           / converge
                    y-last x                  / y is the next item in the list, x contains results so far
              1=mod[        ;32]              / is the result mod 32 equal to 1
       (x;x,y)                                / if false, return x, if true return x concatenated with y
 10h$                                         / cast back to characters
```
[Answer]
# [Perl 5](https://www.perl.org/), 30 + 1 (-n) = 31 bytes
```
/$b/i&&(print,$b=++$_)for/\S/g
```
[Try it online!](https://tio.run/##K0gtyjH9/19fJUk/U01No6AoM69ERyXJVltbJV4zLb9IPyZYP/3//@R8l9T0fB@3f/kFJZn5ecX/dX1N9QwMDf7r5gEA "Perl 5 – Try It Online")
**How?**
```
/$b/i        # check if this letter equals the one in $b, ignore case
&&(print,    # output it if so
$b=++$_)     # store the next character to find
for/\S/g     # Looping over all non-whitespace characters
```
[Answer]
# [Retina](https://github.com/m-ender/retina), 76 bytes
```
 
^.
$&$&$&¶
{T`@@L@l`@l@l@`..¶
T`l`L`.¶
(.)(.)((¶).*?(\1|\2)|¶.*)
$5$5$5$4
```
[Try it online!](https://tio.run/##HY29DoIwFEb3@xR3QAMMTTQ6izHExcFEJmNMC5TyU6hW8Ad5Lh6AF8Nizh1OzjdczeusYuPM3tMRAa4ErPnE0MM3oJ538CT1pIESYlpAJT3QyWziTGcPvUPcjX1ZdJel0w09cR2w1n9W4xipmAslE9ip2P8LTsmIgKNWQrOyzCpxbNpW8gecahYV6L@jlFWCQ5ByvDeZSZrHmKg35k15M6qeXGNtVsnaD4ZavSqMlYAzDzWDbRiZr0ma5YX8AQ "Retina – Try It Online") Link includes test cases. Explanation:
```
 
```
Delete spaces.
```
^.
$&$&$&¶
```
Triplicate the first character and insert a separator.
```
{T`@@L@l`@l@l@`..¶
T`l`L`.¶
```
Convert the second and third characters to lower case and increment them. Convert the latter to upper case. These are now the search characters.
```
(.)(.)((¶).*?(\1|\2)|¶.*)
$5$5$5$4
```
Try to match either of the search characters. If found, then triplicate the match, which restarts the loop for the next search. Otherwise, just delete the search characters and the rest of the input.
[Answer]
# [8th](http://8th-dev.com/), 114 bytes
**Code**
```
: z dup n:1+ 32 bor >r "" swap s:+ . ; 
: f s:trim 0 s:@ z ( nip dup 32 bor r@ n:= if rdrop z then ) s:each rdrop ;
```
**Explanation**
```
: z             \ n -- (r: x)
                \ print letter and save on r-stack OR-bitwised ASCII code of following letter
  dup           \ duplicate item on TOS
  n:1+          \ get ASCII code of the following letter
  32 bor        \ bitwise OR of ASCII code and 32 
  >r            \ save result on r-stack
  "" swap s:+ . \ print letter
;
: f        \ s -- 
  s:trim   \ remove trailing whitespace
  0 s:@    \ get 1st letter
  z        \ print 1st letter and save on r-stack OR-bitwised ASCII code of following letter
  ( nip    \ get rid of index
    dup    \ duplicate item on TOS
    32 bor \ bitwise OR of current ASCII code and 32 
    r@     \ get value stored on r-stack
    n:=    \ compare values to see if letter is printable or not
    if 
      rdrop \ clean r-stack
      z     \ print letter and save on r-stack OR-bitwised ASCII code of following letter
    then 
  ) 
  s:each    \ handle each character in string
  rdrop     \ clean r-stack
;
```
**Example**
```
ok> " The quick red fox jumped over the lazy brown dog" f
Tuvw
```
[Answer]
# [C (gcc)](https://gcc.gnu.org/), ~~79~~ ~~78~~ ~~75~~ 70 bytes
```
c;f(char*s){for(c=0;*s;s++)*s^32&&!c|c==(*s|32)-1?c=32|putchar(*s):0;}
```
[Try it online!](https://tio.run/##lZFPa4MwGIfv/RSZh6IWodPbxI1RvAvtqYyB5p@2alyibWftZ3eJEFGKh@WUvL88T5I30KEQ9j30iQnTmNvCuhPGTRhsfVv4YrOxbPHtuev1C@xgEJi26DzXcl4/YOC5XdXUipJV623rP/oizkrTWt1XQI6KZ2VNTAMyhCnLCXDeAUSYfNWG5U/qciU9wjTkRHEzeMdQqOEdCkdY16fwDARKLzdQfSzV6JgsshFnlMdFkZU0ato2x0JJIi14jhdN@zqGZxDeZJdKipVlX2vNkC2ShxSDnyaTNMcIEHYDp6ao5JRdMAe1TPO4/QUJZ9cSIDY889Bcrtr@X37xIkec8FjZj1o9VBb3fyay25Sk2emcK2xYj/82TWeKR/8H "C (gcc) – Try It Online")
[Answer]
# [Proton](https://github.com/alexander-liao/proton), 59 bytes
Port of the [Python 2 submission](https://codegolf.stackexchange.com/a/139416/59487).
```
s=>reduce((x,y)=>x+y*((ord(y)-ord(x[-1]))%32==1),s.strip())
```
[Try it online!](https://tio.run/##FchJCoAwDADAr0hBSNygeo4fEU9dRBBT0grt66ueBiYIJ76rpxppFWcf4wDyUJDW3JcOgMVCwfEnb6PeEdtlJtI4xCkmOQMg1iDnncCDagxbx5c/1Lcv "Proton – Try It Online")
[Answer]
# Pyth, 15 bytes
```
eo,}r0NG_xQhNty
```
[Test suite](https://pyth.herokuapp.com/?code=eo%2C%7Dr0NG_xQhNty&test_suite=1&test_suite_input=%22codegolf%22%0A%22CodEgolf%22%0A%22+codeolfg%22%0A%22Stack+Exchange%22%0A%22Zebra%22%0A%22Abcdegfhijkl%22&debug=0)
Unlike all of the other answers, this doesn't stick together the output, it generates all subsequences of the input, and then orders them to put the desired string at the end, and outputs it.
[Answer]
# J, partial solution
I'm posting this for feedback and ideas for improvement more than anything else.
It works, but doesn't handle the capitalization and space edge cases, and is already long for J.
First a dyadic helper verb that tells you if the left and right args are alphabetically adjacent:
```
g=.(= <:)&(a.&i.)  NB. could save one char with u:
```
Next a verb that removes the first element which is *not* part of an alphabetic streak starting from the first element:
```
f=.({~<^:3@>:@i.&0@(0,~2&(g/\))) ::]
```
Note we use Adverse `::` to return the entire argument unchanged if there is no non-streak element found (ie, if the entire argument is a valid alphabetic streak).
Finally, the solution is given by applying `f` until convergence:
```
f^:_ 'codegolf'  NB. => 'cdef'
```
[Try it online!](https://tio.run/##y/r/P91WT8NWwcZKU00jUU8tU0@TKw0oUl1nE2dl7GBn5ZCpp2bgoGGgU2ekppGuH6OpqalgZRXLlZqcka@QFmcVr6CenJ@Smp6fk6b@/z8A "J – Try It Online")
---
And here is a parsed version of `f` for easier reading:
```
           ┌─ ~ ─── {                         
           │                              ┌─ <
           │                       ┌─ ^: ─┴─ 3
           │                 ┌─ @ ─┴─ >:      
       ┌───┤           ┌─ @ ─┴─ i.            
       │   │     ┌─ & ─┴─ 0                   
       │   │     │                            
       │   └─ @ ─┤     ┌─ 0                   
── :: ─┤         │     ├─ ~ ─── ,             
       │         └─────┤                      
       │               │     ┌─ 2             
       │               └─ & ─┴─ \ ─── / ──── g
       └─ ]         
```
**Side Question**: why do the box characters not align perfectly when display on SO (they work in my console):
![](https://i.stack.imgur.com/sSINT.png)
]