You unfortunately did not indicate which dialect of regular expressions can be used and what is it for. Perhaps there are simpler solutions based on the special features of regular expressions or simpler means without the use of regulars.
For a PCRE compatible dialect, a similar expression is obtained (before the letter d, continue by analogy, put gaps in taste):
(?:a(?=b))?(?:b(?=c))?(?:c(?=d))?(?:d(?=e))?
Test on ragex101.com
From the "Special features" of regular expressions, you can, for example, in the perl language check any characters in a row to do this:
echo "abpade fg xyz" | perl -npe 's/.*?((?:([az])\s*(?=(??{chr(ord($2)+1)})))+.)/$1\n/g' Результат: ab de fg xyz
Perl can be used instead of grep on most unix systems by writing the required command as a single line.
UPD For the command line, using only grep and sed, a short version:
echo "a bcefgkmoxyz" |\ grep -Po `echo -n 'bcdefghijklmnopqrstuvwxyz' |\ sed 's/./\0\0/g;s/^/a/;s/\(.\)\(.\)/\\\\s*(?:\1(?=\\\\s*\2))?/g;s/.$/./'` |\ sed -n '/../p' Результат: a bc efg xyz
The command is divided into several lines for the convenience of viewing, you can in one line by removing the \ . I was too lazy to write a long regular session, so the result of executing (in reverse apostrophes) the command echo | sed echo | sed creates the necessary expression on the move from the letters of the alphabet. Unfortunately, the ideal expression did not work out and grep produces individual characters as well, the last line sed -n '/../p' used to suppress them.
The grep parameter generated by commands from the alphabet looks like this:
\\s*(?:a(?=\\s*b))?\\s*(?:b(?=\\s*c))?\\s*(?:c(?=\\s*d))?\\s*(?:d(?=\\s*e))?\\s*(?:e(?=\\s*f))?\\s*(?:f(?=\\s*g))?\\s*(?:g(?=\\s*h))?\\s*(?:h(?=\\s*i))?\\s*(?:i(?=\\s*j))?\\s*(?:j(?=\\s*k))?\\s*(?:k(?=\\s*l))?\\s*(?:l(?=\\s*m))?\\s*(?:m(?=\\s*n))?\\s*(?:n(?=\\s*o))?\\s*(?:o(?=\\s*p))?\\s*(?:p(?=\\s*q))?\\s*(?:q(?=\\s*r))?\\s*(?:r(?=\\s*s))?\\s*(?:s(?=\\s*t))?\\s*(?:t(?=\\s*u))?\\s*(?:u(?=\\s*v))?\\s*(?:v(?=\\s*w))?\\s*(?:w(?=\\s*x))?\\s*(?:x(?=\\s*y))?\\s*(?:y(?=\\s*z))?.