[Question]
  [
This challenge is inspired by one of my other challenges: [Pointlessly make your way down the alphabet](https://codegolf.stackexchange.com/questions/196192/)
That challenge asked you to take a string of text, and for each letter produce a sequence of letters moving down the alphabet to 'a'.
For this challenge I'd like to decode the output of that challenge (minus the line breaks), to find a human-readable string from a much longer human readable string.
---
Here is some text which has been encoded using the Dreaded Alphabet Cypher™️
hgfedcbaedcbalkjihgfedcbalkjihgfedcbaonmlkjihgfedcba wvutsrqponmlkjihgfedcbaonmlkjihgfedcbarqponmlkjihgfedcbalkjihgfedcbadcba
It consists of descending alphabetical sequences, ending in an 'a'. The first character in each of these sequences is a letter in the decoded text. (A space is still a space).
# The challenge
* Write code to convert a Dreaded Alphabet Cypher™️ encoded string into a decoded, human-readable string.
* No need to validate if it is a Dreaded Alphabet Cypher™️ string, I'm not interested in how it handles invalid input.
* Use any language you please.
* Please include a link to an online iterpreter.
* The input will only consist of lower-case letters and spaces. No upper cases, punctuation etc.
* Code golf, try to write short code, standard loopholes etc.
# Test Cases
Input:
```
hgfedcbaedcbalkjihgfedcbalkjihgfedcbaonmlkjihgfedcba wvutsrqponmlkjihgfedcbaonmlkjihgfedcbarqponmlkjihgfedcbalkjihgfedcbadcba
```
Output:
```
hello world
```
---
Input: 
```
abacbadcbaedcbafedcbagfedcbahgfedcbaihgfedcbajihgfedcbakjihgfedcbalkjihgfedcbamlkjihgfedcbanmlkjihgfedcbaonmlkjihgfedcbaponmlkjihgfedcbaqponmlkjihgfedcbarqponmlkjihgfedcbasrqponmlkjihgfedcbatsrqponmlkjihgfedcbautsrqponmlkjihgfedcbavutsrqponmlkjihgfedcbawvutsrqponmlkjihgfedcbaxwvutsrqponmlkjihgfedcbayxwvutsrqponmlkjihgfedcbazyxwvutsrqponmlkjihgfedcba
```
Output:
```
abcdefghijklmnopqrstuvwxyz
```
---
(beware the multiple a's)
Input:
```
aarqponmlkjihgfedcbaonmlkjihgfedcbanmlkjihgfedcba a aarqponmlkjihgfedcbaonmlkjihgfedcbanmlkjihgfedcbasrqponmlkjihgfedcbaonmlkjihgfedcbanmlkjihgfedcba hgfedcbaasrqponmlkjihgfedcba anmlkjihgfedcba aarqponmlkjihgfedcbadcbavutsrqponmlkjihgfedcbaarqponmlkjihgfedcbakjihgfedcba
```
Output:
```
aaron a aaronson has an aardvark
```
---
Input:
```
hgfedcbaaponmlkjihgfedcbaponmlkjihgfedcbayxwvutsrqponmlkjihgfedcba gfedcbaonmlkjihgfedcbalkjihgfedcbafedcbaihgfedcbanmlkjihgfedcbagfedcba
```
Output (is a secret, shh)
  
[Answer]
# JavaScript (ES9), ~~37 33~~ 26 bytes
Returns an array of characters.
Either a negative look-behind:
```
s=>s.match(/(?<![b-z])./g)
```
[Try it online!](https://tio.run/##lVJLEoIwDN17CmRDu6BcQPQgjovyB4EiRVQuXxUBoaSg02knTV@Sl9cktKbcLeOiMnPm@SKwBbf3nGS0ciNkocNue3TM5oSJFWLhspyz1CcpC1GA9CgMfM91aHuk5yTuHWOb5dn4qt3qa8XLSyH5pescMLbfW8ckYXGODAPjjUSMOrRDtfBPUBfb5xiSfdMqqk1oLLKWOc@amLcFSAHJA2oGK6kQ@K7wP1QPjfJlUXq6@rfSQLzWvzH83xq9AUVqM0IAHbXcAPhHqYYMxcoYKT9Cg5sf29KwT4EASfEE "JavaScript (Node.js) – Try It Online")
Or a positive look-behind:
```
s=>s.match(/(?<=a| |^)./g)
```
[Try it online!](https://tio.run/##lVLbEoIgEH3vKxxfhIfwB7L@pBm8awomZpfx361MTWHRGgZmWc7unj1sSmsqvDIpqi3jftCGTiucvSA5rbwY2eiwc2hjNEdM7Ai3HmeCZwHJeIRCZMZRGPieS7sjO6XJ4JjanOXTq3GtL5Uoz4Xkl64qYGq/t4lJyhOGLAvjjUSMurRHdfBPUB875BiTfdNqqs1oLLKWOStNqG0BUkDygJrBSmoEvmn8d93DQ/uyKD1d/VtpIF7r3xjxb43BgCINhRBARy83AP5RqjFDsTJG2o8w4OantjTscyBAsn0C "JavaScript (Node.js) – Try It Online")
---
## 25 bytes
If the input is guaranteed not to contain leading or double spaces (or we're allowed to remove and collapse them respectively), the positive look-behind can be made 1 byte shorter:
```
s=>s.match(/(?<=a|\b)./g)
```
[Try it online!](https://tio.run/##lVJLEoIwDN17CoYN7cJyAdGLuCl/EFqkiJ/x7qgICG0KMp120vQleXlNSmsqvDIpqi3jftCETiOcvSA5rbwY2eiwc@jz6GJiR7jxOBM8C0jGIxQiM47CwPdc2h7ZKU16x9jmLB9fjWt9qUR5LiS/dFUBY/uzTUxSnjBkWRhvJGLUpR2qhX@Dutg@x5Dsl1ZTbUJjlrXMWWlCbQuQApIH1AxWUiPwTeO/6x4e2pdZ6eni30oD8V5rY8TaGr0BRRoKIYCOXm4A/KdUQ4ZiYYy0H2HAzY9tadinQIBk8wI "JavaScript (Node.js) – Try It Online")
[Answer]
## Haskell, 32 bytes
```
f s=[y|(x,y)<-zip('a':s)s,x<'b']
```
[Try it online!](https://tio.run/##lVJLDoIwEL3KhJgACXoAAzdw55KwKAqCfKwU5BPvXhUpltJKSNNmPm/aN28aIZIEaUppCMRx26fRWK1pb7sYGzrS98QkVmPrvu7RDMU5OICr8lgWhxx2QKJbDRvIEIYQXC26hMH55KP@SJNrzAK8fcsz3oX6UZWkuGMhLrhzAG9/tmaBhnw0eH34mxwwDDsW/coVt06e@8tO5DYjO6cvaVkmg1QbuWIKIRtFvFUlOmWmlxgtzkoY8HutrSFr32CGrBJmhCR01LJKwIIkIxIvfAulsCBvkreFzzsFMjIefQE)
For each pair of consecutive characters, if the first one is `'a'` or `' '`, output the second one. Prepends an `'a'` to the string so that the first character is always output.
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 6 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
OŻI‘Tị
```
A monadic Link accepting a list of characters which yields a list of characters.
**[Try it online!](https://tio.run/##y0rNyan8/9//6G7PRw0zQh7u7v7//79SYmJRYUF@Xm5OdlZmRnpaakpyUiIaF5WnAISk6ikm1Q4YA5tOBQwHYXEOCJeVlmDRjkUxElMJAA "Jelly – Try It Online")**
### How?
```
OŻI‘Tị - Link: list of characters, S   e.g. "  baadcba  acbaedcba  "
                                       i.e. [' ',' ','b','a','a','d','c','b','a',' ',' ','a','c','b','a','e','d','c','b','a',' ',' ']
O      - to ordinal (vectorises across S)   [ 32, 32, 98, 97, 97,100, 99, 98, 97, 32, 32, 97, 99, 98, 97,101,100, 99, 98, 97, 32, 32]
 Ż     - prepend a zero                 [  0, 32, 32, 98, 97, 97,100, 99, 98, 97, 32, 32, 97, 99, 98, 97,101,100, 99, 98, 97, 32, 32]
  I    - incremental differences            [ 32,  0, 66, -1,  0,  3, -1, -1, -1,-65,  0, 65,  2, -1, -1,  4, -1, -1, -1, -1,-65,  0]
   ‘   - increment (vectorises)             [ 33,  1, 67,  0,  1,  4,  0,  0,  0,-64,  1, 66,  3,  0,  0,  5,  0,  0,  0,  0,-64,  1]
    T  - truthy indices                     [  1,  2,  3,      5,  6,             10, 11, 12, 13,         16,                 21, 22]
     ị - index into (S)                     [' ',' ','b',    'a','d',             ' ',' ','a','c',       'e',                ' ',' ']
                                       i.e. "  bad  ace  "
```
[Answer]
# [J](http://jsoftware.com/), ~~22 13~~ 12 bytes
–9 bytes, thanks @Jonah!
```
#~1,1-{:I.}:
```
[Try it online!](https://tio.run/##y/qvpKeepmBrpaCuoKNgoGAFxLp6Cs5BPm7/lesMdQx1q6089Wqt/mtypSZn5CukKahnpKelpiQnJSYW5Ofl5mRnZcIE0PmVFeVlpSXFRYXoEgpQGk0YmQ0h4VxUhVBKHe6kxERMS9C4aC4AQlL1FJNqBzygsAUBhoOwOAeEsYcgFsVITPX/AA)
[Answer]
# [Perl 5](https://www.perl.org/) (`-p`), ~~15~~, 16 bytes
```
s/[b-z]\K.*?a//g
```
[Try it online!](https://tio.run/##K0gtyjH9/79YPzpJtyo2xltPyz5RXz/9//@M9LTUlOSkRDCRk52VCRNAZufn5SJzFcrLSkuKiwoL0MTRuJgKkNkgzJWYlAhlgsUgMlAFMIVwHQi9OIxEsQuv09AdhuFSTLdj8S@2MMAaMNiDC0coVuAQr8QlUYVThisxkWAsoUUtEJKqp5hUO2AMbDoVMByExTm4wxSLYuTwgCsrIJAgcAapAnYfIrPRki2qQij1L7@gJDM/r/i/bgEA "Perl 5 – Try It Online")
or using options trick
# [Perl 5](https://www.perl.org/) (`-nF/(?<![\x20a])(?!^)[b-z]*a/`), 7 bytes
```
print@F
```
[Try it online!](https://tio.run/##K0gtyjH9/7@gKDOvxMHt//@M9LTUlOSkRDCRk52VCRNAZufn5SJzFcrLSkuKiwoL0MTRuJgKkNkgzJWYlAhlgsUgMlAFMIVwHQi9OIxEsQuv09AdhuFSTLdj8S@2MMAaMNiDC0coVuAQr8QlUYVThisxkWAsoUUtEJKqp5hUO2AMbDoVMByExTm4wxSLYuTwgCsrIJAgcAapAnYfIrPRki2qQij1L7@gJDM/r/i/bp6bvoa9jWJ0TIWRQWKspoa9YpxmdJJuVaxWoj4A "Perl 5 – Try It Online")
[Answer]
# [Python 3](https://docs.python.org/3/), 43 bytes
```
lambda s:[r for l,r in zip(' '+s,s)if'b'>l]
```
An unnamed function accepting a string which returns a list of characters.
**[Try it online!](https://tio.run/##K6gsycjPM/6fZhvzPycxNyklUaHYKrpIIS2/SCFHp0ghM0@hKrNAQ11BXbtYp1gzM009Sd0uJ/Z/SWpxiYKtgnpiYlFhQX5ebk52VmZGelpqSnJSIhoXlacAhKTqKSbVDhgDm04FDAdhcQ4Il5WWYNGORTESU52Lq6AoM69EI00DFEKamv8B "Python 3 – Try It Online")**
---
To accept & return lists use `...zip([' ']+s...` instead (45)
To accept & return strings use `lambda s:''.join(r for l,r in zip(' '+s,s)if'b'>l)` (50)
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~100~~ ~~98~~ ~~96~~ ~~95~~ ~~94~~ ~~92~~ ~~90~~ ~~88~~ ~~64~~ 46 bytes
Saved 24 bytes thanks to @Neil!!!  
Saved 18 bytes thanks to @dingledooper (removed #include<stdio.h>)
```
f(char*c){while(*c)for(putchar(*c);*c++>97;);}
```
[Try it online!](https://tio.run/##lVPbDoIwDH3nKxaehsTEN2OW@CW@jMlNceAA8RK/HQfCxNGJQEbarj07PStsyRLKw7oOMIuoWDDnUUVx4mNpBanAWVk08cYlC@a6282aOORZx7xAJxpz7FgPC8knwHYUBv6eebT9JMdD3AeGdspPQxdVl7LIxTnT4po7ThjazbId0vLIhKQmyex4H5EO9WiX1ua/q7riHkShfXANx9ktLEL2F6Gf/HX2o3YU5rhTQB1IMVBGBQurbBD/aogrtJsp427c@X0/dHICtLGR79yafO4ZvQFVohEhgE6zYDWA5H@1UhDZxIwZrwLB3Q9t7Zf4TtRYCr8oBUcrYj2t@gU "C (clang) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~9~~ 8 bytes
*-1 byte thanks to Kevin Cruijssen*
```
AηíR¬S.:
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f8dz2w2uDDq0J1rP6/z8xsaiwID8vNyc7KzMjPS01JTkpEY2LylMAQlL1FJNqB4yBTacChoOwOAeEy0pLsGjHohiJCQA "05AB1E – Try It Online")
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-g`](https://codegolf.meta.stackexchange.com/a/14339/), ~~10~~ ~~9~~ 8 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
óÈ¥YcÄÃy
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LWc&code=88ilWWPEw3k&input=ImhnZmVkY2JhZWRjYmFsa2ppaGdmZWRjYmFsa2ppaGdmZWRjYmFvbm1sa2ppaGdmZWRjYmEgd3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFvbm1sa2ppaGdmZWRjYmFycXBvbm1sa2ppaGdmZWRjYmFsa2ppaGdmZWRjYmFkY2JhIg)
```
ó           split between those characters that return true when passed through...
 È    Ã     function :
  ¥         x equal to..
   YcÄ      character next to y
       y   transpose
Flag -g used to get 1st element 
```
Saved 1 thanks to @Shaggy
[Answer]
# [R](https://www.r-project.org/), ~~57~~ 56 bytes
-1 byte thanks to Giuseppe.
```
function(s)intToUtf8(c(v<-utf8ToInt(s),0)[c(0,v)%%32<2])
```
[Try it online!](https://tio.run/##K/qfZvs/rTQvuSQzP0@jWDMzryQkP7QkzUIjWaPMRrcUyArJ98wrAUrpGGhGJ2sY6JRpqqoaG9kYxWr@T9NQykhPS01JTkoEEznZWZkwAWR2fl4uMlehvKy0pLiosABNHI2LqQCZDcJKmlxAJyQmJUL5YAmINFQVTDVcG8IAHOaiWIjXfeiuw3AupgeweBpbQGANHexhhiMoK3CIV@KSqMIpAw3kRILxhRbJQEiqnmJS7YAxsOlUwHAQFufgDlgsijECBa62gEDSwBm4Cti9icxGS8CoClHjSEnzPwA "R – Try It Online")
Could probably be made shorter with a regex, but this is more R-like. Converts to integers (vector `v`), then keeps only the first character and the characters which follow a space or an `a`. Since the corresponding codepoints are 32 and 97, we can check whether \$v\_i\mod 32 <2\$ to get the relevant entries.
[Answer]
# [Haskell](https://www.haskell.org/), 59 bytes
```
f""=""
f(x:s)|x<'b'=x:(f s)|1>0=x:(f$tail$dropWhile(>'a')s)
```
[Try it online!](https://tio.run/##lVJBDoIwELzziqYhAW56JcILvHnwXIQKUqBS0Gr8e0UEhNJKCIHM7s6ys9PGiKURIUJgCD0IDWxzlzkvvrMCy@OujUETbf1Ni80KJcQMy4Ie44REtm8hy2GOyFCSe2FhAFpXh6rc5yYGMD7jKDwFqP2Q9JL0iTEu8mwcgvutrlh5pVJeCueEMf68cKoFBagrtIwvr6P3bUP/70@aAZPJf4XKMme655sotlc5orRJbZ7GU67JP3SFp7Yiu40WT1A69uZZ28PWzuiBqhPMBCnk6B1WkPXuDE104bJo7QbqfcdYutJTYq9LvAE "Haskell – Try It Online")
No match for regex solutions, but I figured I'd try a recursive solution.
[Answer]
# JavaScript, ~~35~~ ~~32~~ 31 bytes
```
s=>s.replace(/ |.*?a/g,x=>x[0])
```
[Try it online!](https://tio.run/##y0osSyxOLsosKNHNy09J/Z9m@7/Y1q5Yryi1ICcxOVVDX6FGT8s@UT9dp8LWriLaIFbzf3J@XnF@TqpeTn66RpqGUkZ6WmpKclIimMjJzsqECSCz8/NykbkK5WWlJcVFhQVo4mhcTAXIbBBW0tT8DwA)
[Answer]
# [Ruby](https://www.ruby-lang.org/en/), 28 bytes
```
->s{s.scan(/(?<=a|\b)./)*""}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1664ulivODkxT0Nfw97GNrEmJklTT19TS0mp9n9BaUmxQppecmJOjoZ6RnpaakpyUiKYyMnOyoQJILPz83KRuQrlZUAjigoL0MTRuJgKkNkgrK7JxYXimsSkRKgUWA1EJVQDTCPcBIRZOKxAsRuvU9EdiuFyTL9g8T@2MMEaUNiDD0eoVuAQr8QlUYVTBjO8EwnGIlrUAyGpeopJtQPGwKZTAcNBWJyDO4yxKMYXPnBtBQQSDM4gV8DuY2Q2WrJGVQh32X8A)
This is a port of [Arnauld's Javascript answer](https://codegolf.stackexchange.com/questions/196466/decode-the-dreaded-alphabet-cypher%ef%b8%8f/196467#196467) to Ruby.
[Answer]
# [K (oK)](https://github.com/JohnEarnest/ok), 14 bytes
```
{x@&1,98>-1_x}
```
[Try it online!](https://tio.run/##y9bNz/7/P82qusJBzVDH0sJO1zC@ovZ/mrqGUkZ6WmpKclIimMjJzsqECSCz8/NykbkK5WWlJcVFhQVo4mhcTAXIbBBWslZKTEqEcsCiEDmoEphSuB6EbhyGotiG13HoTsNwK6brsfgYWyhgDRrsAYYjHCtwiFfikqjCKQMK4USCMYUWvUBIqp5iUu2AMbDpVMBwEBbn4A5VLIpRQwSusIBAosAZrArY/YjMRku6qAphbtH8DwA "K (oK) – Try It Online")
Inspired by [FrownyFrog's/Jonah's J solution](https://codegolf.stackexchange.com/a/196475/75681)
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-S`](https://codegolf.meta.stackexchange.com/a/14339/), ~~9~~ 8 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
¸®ò§ mÎ¬
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LVM&code=uK7ypyBtzqw&input=ImFhcnFwb25tbGtqaWhnZmVkY2Jhb25tbGtqaWhnZmVkY2Jhbm1sa2ppaGdmZWRjYmEgYSBhYXJxcG9ubWxramloZ2ZlZGNiYW9ubWxramloZ2ZlZGNiYW5tbGtqaWhnZmVkY2Jhc3JxcG9ubWxramloZ2ZlZGNiYW9ubWxramloZ2ZlZGNiYW5tbGtqaWhnZmVkY2JhIGhnZmVkY2JhYXNycXBvbm1sa2ppaGdmZWRjYmEgYW5tbGtqaWhnZmVkY2JhIGFhcnFwb25tbGtqaWhnZmVkY2JhZGNiYXZ1dHNycXBvbm1sa2ppaGdmZWRjYmFhcnFwb25tbGtqaWhnZmVkY2Jha2ppaGdmZWRjYmEi)
```
¸®ò§ mÎ¬    :Implicit input of string
¸           :Split on spaces
 ®          :Map
  ò         :  Partition between characters where
   §        :  First is <= second
     m      :  Map
      Î     :    First character
       ¬    :  Join
            :Implicit output, joined with spaces
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
```
Ḳµ=Ṃk⁸ZḢ)K
```
[Try it online!](https://tio.run/##y0rNyan8///hjk2Htto@3NmU/ahxR9TDHYs0vf///5@YWFRYkJ@Xm5OdlZmRnpaakpyUiMZF5SkAIal6ikm1A8bAplMBw0FYnAPCZaUlWLRjUYzEBAA "Jelly – Try It Online")
A monadic link taking a Jelly string and returning a Jelly string. When run as a full program takes a string as its argument and implicitly prints the output string. 
[Answer]
# [SNOBOL4 (CSNOBOL4)](http://www.snobol4.org/csnobol4/), 106 bytes
```
	I =INPUT
S	I LEN(1) . X	:F(O)
	O =O X
	R =
	REVERSE(&LCASE) X REM . R
	I X R REM . I	:(S)
O	OUTPUT =O
END
```
[Try it online!](https://tio.run/##K87LT8rPMfn/n9NTwdbTLyA0hCsYyPRx9dMw1FTQU4jgtHLT8Nfk4vRXsPVXiODiDFKwBRKuYa5Bwa4aaj7OjsGumgoRCkGuvkDVQVxAvUAOlOvJaaURrMnlz@kfGgI0GWgCl6ufy///iYlFhQX5ebk52VmZGelpqSnJSYloXFSeAhCSqqeYRPUA "SNOBOL4 (CSNOBOL4) – Try It Online")
```
	I =INPUT			;* Read input
S	I LEN(1) . X	:F(O)		;* extract the first letter or goto O if none exist
	O =O X				;* append that letter to the output
	R =				;* set R to the empty string
	REVERSE(&LCASE) X REM . R	;* Set R to the letters up to 'a', starting at X.
					;* R is empty string if X is space or 'a'
	I X R REM . I	:(S)		;* Set the REMainder of I after (X + R) to I; goto S
O	OUTPUT =O			;* output the string
END
```
[Answer]
# [Red](http://www.red-lang.org), 74 bytes
```
func[s][parse s[any[copy t thru"a"(prin#"`"+ length? t)opt[sp(prin sp)]]]]
```
[Try it online!](https://tio.run/##lVPbUsMgEH3PV@ysL@34B33xH3xlmJFyaaoVEEhr/PnYxKSlXNSGCbOXs3A4LE6K4VkKQhu1gUF1mhNPiWXOS/CE6Z5wY3sIEFrXIcOVdXv9gC/4CAepd6F9grA2NhBvpxR4u6bnb1DGScZb4EZIAQTbnZKCb9k0Hd5e90sgto1@j104Hbvg3YdN4ombA2J7/LFBtmWzM0V/cjNkgV5qrtWVRW92@5VcSi3jmrMvnLikQlGasmAVHT8r8b6W@KpmRoXZnzeVXO953Fvj791jMUqVkBEq0KmrWgDHikBzafqsC/6tOJQPGdtJ794CFzIUiJrf4vhMAyDS4Rs "Red – Try It Online")
[Answer]
# [braingasm](https://github.com/daniero/braingasm), ~~20~~ 18 bytes
```
,[.32-n[65-$[,]],]
```
It's been a while since I worked on braingasm. There seems to be a `compare` function, but I guess I didn't come around to implement a way to use the result. Well, this works:
```
,                    #  Read a byte from input
 [               ]   #  While the current byte is not zero
  .                  #    Print it
   32-               #    Decrease by 32
      n[       ]     #    If the result is non-zero (meaning it wasn't a space):
        65-          #      Subtract 65, leaving 'a' => 0, 'b' => 1, 'c' => 3, etc
           $[,]      #      That many times, read a byte from input
                ,    #    Read another byte
```
Doesn't handle newlines or anything other than lowercase letters and spaces in the input.
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 12 bytes
```
aR`\w*?a`_@0
```
[Try it online!](https://tio.run/##K8gs@P8/MSghplzLPjEh3sHg////GelpqSnJSYlgIic7KxMmgMzOz8tF5iqUl5WWFBcVFqCJo3ExFSCzQRgA "Pip – Try It Online")
### Explanation
```
a             The input, as a command-line argument
 R            Do a regex replacement:
  `\w*?a`      Match a non-greedy series of letters ending in a
         _@0   Replace with the first character of the match
```
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 33 bytes
```
x=>x.Where((_,l)=>l<1||x[l-1]<98)
```
[Try it online!](https://tio.run/##lVRdb8IgFH0ev4L4BEk18W1LP17MlizZuw/GLJRRy6zUAdVu09/eWWu1UpixpM39OBcOB26pGlLFq5dC0EBpycXCe30WxYpJEmcsoCmRUZSEVRlG5WiaMskQevcyHEZZMN7tylk2HM@Dp0dc@WBDJNRMaQVDKNh2Noe/4GGQLhL2QWNy/GTLT94GunYuVl0XbjeFVvJrbcQNtw/o2vU78A4MSExO7jHeZE@gFnyuutQ7pr1a7196Jrke2z5/y55tOljFsUvmULJ0xL9diR9nptGY3Dwt44gP494ade8arWGrhD1CFjpuXS1gU5MzdH3jYjilhfZddm3j@l4DWzZg74Mkl4zQFLVdCrlouhXXbTqVXLM3Lhhq/gKjSS4o0ShBNQZj7IM9gJ2nIuAP "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# [C (clang)](http://clang.llvm.org/), ~~66~~ 48 bytes
edit: -18 bytes thanks to @dingledooper (removed #include)
```
P;D(char*T){*T?P>97||putchar(*T),P=*T++,D(T):0;}
```
[Try it online!](https://tio.run/##S9ZNzknMS///P8DaRSM5I7FIK0SzWivEPsDO0rympqC0BCSmARTUCbDVCtHW1nHRCNG0MrCu/Z@ZV6KQm5iZp6HJVc2lAAQuGkqJiQoZ6WmpKclJiWAiJzsrEyaAzM7Py0XmKpSXlZYUFxUWoImjcTEVILNBWEnTGuwUmLvVY/LUoUJg1xG0As1dQEiqnmJS7YAxsOlUwHAQFueAMPbww6IYiYk/sOBmoJuAzq@swBF7Cti9j8yGkDhCBs2ZRaklpUV5CgbWXLVc/wE "C (clang) – Try It Online")
```
int P;          // previous character
D(char*T)
{
    if (*T)     // check for end of string
    {
        if (!(P > 'a'))     // output current if previous was 'a' or ' '
            putchar(*T);
        P = *T;             // update previous
        D(T + 1);           // find next
    }
}
```
[Answer]
# x86 machine code, 12 bytes
(Runs in any mode, 16-bit, 32-bit, or 64-bit.)
This is based on [@Noodle9's C algorithm](https://codegolf.stackexchange.com/a/196505/30206), but with rearrangement into do{}while asm loop structure.
NASM listing: address, machine code (hex dump of the actual answer), source
```
 1                             decda:  ; (char *dst=RDI, const char *src=RSI)
 2 00000000 AC                     lodsb             ; AL = *src++
 3                             .loop:                ; do{
 4 00000001 AA                     stosb                 ; *dst++ = AL
 5                                .skip_until_a:         ; do{
 6 00000002 3C61                    cmp  al, 'a'
 7 00000004 AC                      lodsb
 8 00000005 77FB                    ja  .skip_until_a    ; }while((AL=*p++) > 'a')
 9 00000007 84C0                   test al,al
10 00000009 75F6                   jnz .loop         ; } while(AL != terminator)
11                             ;    stosb             ; append a terminating 0
12 0000000B C3                     ret
                       ; output end pointer returned in RDI
```
[Try it online!](https://tio.run/##lVRNbxoxED3Xv2J6ArIQQVtVEYhKkXqJFPWQHiO0ml0bcOK1tx4vgbb57XR2zceGkEqxBNgz82be84xBIlVkZjOwSMV2K1UucQwwgW6@RA8XksL07vtNH3JnKUA0ks@ndz9vegJ4GScpg/aawPUtTJuwJBGXxrlyDCdrAtL9afAU3Ak@@uvSScJ5rm/ruEt61GVa2aBNiuMzeSAvSgA0fehgJ1oaanH7gCcpIvj5aamN6navb6cXZZL04FuNjsKCYsGcD01zfLC/odHSqv0MEc96P04Z4AttMTjfE5Pz0iaAZamsBDxEa7uAYVPBqyAm/FV5SxxQOm05CIIDZ9WgRAqDGurmEJYKXBXKigE5GsNRaLxCuYEl1thMLbQ9ZlhiqDEb4CSkJFQktg1DtWa/ZaLeKCvaJs5NLwxqrYMQUs2xMoG5xltZGJehgZQC@iDizzjiCrdiTVL34d5TmVxBAlcXo9nuGvxidT@axchawp7DhwnoojQ612HA50VYgrZMBkipgkAhaeVbBVS@7rN1LeIwKtzX5PvJqvlMHKnQ/6kcmDSPQERnbEvTkbf6wRfNL6Rdn87Xl8yUucWpr7K9hfRuNKLctrba//WLaBk48@gwS3PZcuG67UrTH3fpk9dBxXIbaqQd/I2rO@pDpFmX6Ymj5jfu8ditZjwa29p5iMzUTlvDJxL69Hl0vn49TenCu6rsDnutKdiNmSCVB@0sXEoMKCKHMQRdKGKqIDPo/O3EVCtNOjMq/jeRgyfeouUuBs4BjJtz09xKeV9ZEnsKMdVoOKxzDcV2i@h/lc4W5vFBLxdzJfMMT44vT/zM3o2h99bYb84h4RWhM3Tqz4qb9dpzJri1Ff8A "Assembly (nasm, x64, Linux) – Try It Online")
The input is an implicit-length (0-terminated) C string. The output is an explicit-length buffer. This function returns (in RDI) a pointer to one-past-the-end.
(The caller already knows where the output buf starts, so it has C++-like .begin and .end iterators). Making this function append a terminating `0` would cost 1 extra byte for another `stosb` after the loop, unless there's a way to rearrange things that I'm not seeing.
---
A sample caller that passes the output of `decda(argv[1])` to a `write` system call is included in the TIO link. You can `inc edx` in that caller to prove that the output didn't over-write beyond where it's supposed to.
I had been thinking of using `loop .loop` instead of `test al,al/jnz` but then the inner loop would need a `dec ecx` or something. (Without that, it loops until writing RCX *output* bytes, which only works if the caller knows the decrypted length, not the source length.) Worth considering for a 32-bit-only version that can use 1-byte `dec ecx`, unless that could reach `loop` or `loopne` with ECX<=0 for valid inputs.
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 69 bytes
Hard to beat Regex on this one
```
s=>System.Text.RegularExpressions.Regex.Replace(s,"([b-z]).*?a","$1")
```
[Try it online!](https://tio.run/##ZYoxD4IwFIR3fkXTOLQGSJwRnXRyUhMH41DqA6tQsK8o@ueraEwavOTdu/tyEiOJyi1bLadojdJF@H0zkpPUYTrbPNBCFW@hs/EairYUZtE1BhBVrbFH0L29KYUEhiFl@yx6Hng8ngsa0tGEcpcEO6MsrJQGljN6KnI4ykx8rLyc1Q/4udaVX8n91lo012bAB/V/4Of@KOdJQDy5Fw "C# (Visual C# Interactive Compiler) – Try It Online")
**Returns an array of Matches (characters), 64 bytes**
```
s=>System.Text.RegularExpressions.Regex.Matches(s,"(?<![b-z]).")
```
[Try it online!](https://tio.run/##fU9Nb8IwDL33V4SeEgnyB/qxQwWncYEJDhOHkLklLKQsdiDjz3e006SKSViy9fz8/KVxptF0AY1r2PobCU7yDSLJFTTBKj@PZw@IpnWYJYvgdI7k79rpUpE@VK21oOleLVnNig6L8vmMnoIoh2ZAjtOUv@ST9/3sthMyFV2WbL0heDUO@O8iWbVOK@I1Tw9NDR96r4ZgP4/mjxjj1p3GKbteAqH/Oj/wD@l/wRj3ngpZKaR8OL3kQq6hf51HVpQsyo2yAYQQWcJG1v0A "C# (Visual C# Interactive Compiler) – Try It Online")
[Answer]
# Ruby, 20 + 1 bytes
```
gsub /(?<!a|\b)./,''
```
1 extra byte for the `p` command line option:
```
$ ruby -p alphabet_cypher.rb <<< "hgfedcbaedcbalkjihgfedcbalkjihgfedcbaonmlkjihgfedcba wvutsrqponmlkjihgfedgfedcbarqponmlkjihgfedcbalkjihgfedcbadcba"
hello world
```
[Try it online!](https://tio.run/##KypNqvz/P724NElBX8PeRjGxJiZJU09fR139//@M9LTUlOSkRDCRk52VCRNAZufn5SJzFcrLSkuKiwoL0MTRuJgKkNkg/C@/oCQzP6/4v24BAA "Ruby – Try It Online")
[Answer]
# [Gema](http://gema.sourceforge.net/), 41 characters
```
\A\P?=?
 \P?=$0
?\P?=@cmps{?;?;$2;$2;}
?=
```
Unfortunately recognizers can not be combined. ☹
Sample run:
```
bash-5.0$ gema '\A\P?=$0; \P?=$0;?\P?=@cmps{$1;$2;$2;$2;};?=' <<< 'cbagfedcba cbacba'
cg cc
```
[Try it online!](https://tio.run/##S0/NTfz/P8YxJsDe1p5LAUSpGHDZg2iH5NyC4mp7a3trFSMQquWyt/3/PzGxqLAgPy83JzsrMyM9LTUlOSkRjYvKUwBCUvUUk2oHjIFNpwKGg7A4B4TLSkuwaMeiGIkJAA "Gema – Try It Online")
[Answer]
# Perl, 20 bytes
```
s:[^a]*a(.):a$_\1:g;
```
is **almost** there. Unfortunately, it will lose the first letter, and I don’t know how to get around that.
[Answer]
# [Keg](https://github.com/JonoCode9374/Keg), `-ir`, `-lp`, ~~9~~ 7 bytes
```
(⑩(a-|_
```
[Try it online!](https://tio.run/##y05N//9f49HElRqJujXx//9npKelpiQnJSYW5Ofl5mRnZcIE0PmVFeVlpSXFRYXoEgpQGk0YmQ0h4VxUhVDqv25m0X/dnAIA "Keg – Try It Online")
*2 bytes saved thanks to @A̲̲ suggesting to use a for loop over a while loop*
## Answer History
```
{!|⑩(a-|_
```
[Try it online!](https://tio.run/##y05N//@/WrHm0cSVGom6NfH//2ekp6WmJCclJhbk5@XmZGdlwgTQ@ZUV5WWlJcVFhegSClAaTRiZDSHhXFSFUOq/bmbRf92cAgA "Keg – Try It Online")
```
{!|⑩(a-|_
{!|             #While there are still items on the stack:
   ⑩            #Print t.o.s without popping
    (a-|            #Subtract the code point of a from tos and repeat that many times:
        _           #Pop items off the stack
```
[Answer]
# C++, 464 bytes
I'm still a beginner so will be grateful for any advice.
```
#include <iostream>
#include <string>
using namespace std;
int main() {
  string input , output;
  getline(cin,input);
  output = input[0];
  for (int i = 0 ; i<input.size() ; i++) {
      if (input[i] == 'a')  {
          output += input[i+1];
      }  else if (input[i] == ' ') {
          output += input[i+1];
      }  else {
          continue;
      }
  }
  cout << output;
}
```
[Try it online!](https://tio.run/##lVBBboMwELz7FSP1AIi0Ss9APlJxcI2h28JCsN1KrXg7tSGhKDnVku3dmdkZ2WoYHhul5vmBWLWu0sipN3bUsjuJP8wjxM1JOOMvsOy0GaTSMLbKhCC26CRxnOBHAKsYxIOzOKB31heZJxptW2IdK@LDwiYBXXkU68DLsfSOQN2PiIMxeeaIDJQv/JOhb@2DPJCma15YVAd1mKcSRYFIRgk2NqxLTHrNofS5zC78BOjW6HsXRMm/TfZ61bMldnrThKdNIhDeJs@3z5nm@a2pdaVe5XK0H@90BfZ1z92@xdens2Y8Dzf4TXsv2Ndh/wI "C++ (gcc) – Try It Online")
[Answer]
# [Python 3.8 (pre-release)](https://docs.python.org/3.8/), 50 bytes
```
import re
f=lambda s:re.sub('([b-z]).*?a',r'\1',s)
```
Regex stolen from [Arnauld's JavaScript answer](https://codegolf.stackexchange.com/a/196467).
[Try it online!](https://tio.run/##K6gsycjPM7YoKPr/PzO3IL@oRKEolSvNNicxNyklUaHYqihVr7g0SUNdIzpJtypWU0/LPlFdp0g9xlBdp1jzf0FRZl6JRppGZl5BaYmGpqbm/4z0tNSU5KREMJGTnZUJE0Bm5@flInMVystKS4qLCgvQxNG4mAqQ2SAMAA "Python 3.8 (pre-release) – Try It Online")
]