1:- module(dcg_extras, [seq//1, seqq//1, (...)//0]).
?- phrase(("Hello, ",seq(Cs),"!"), "Hello, all!"). Cs = "all" ; false.
25seq([]) --> []. 26seq([E|Es]) --> [E], seq(Es).
?- phrase(seqq(["ab","cd","ef"]), Ls). Ls = "abcdef".
38seqq([]) --> []. 39seqq([Es|Ess]) --> 40 seq(Es), 41 seqq(Ess).
?- phrase((...,"you",...,"!"), "Hello, you all!"). true ; false.
54... --> [] | [_], ...
Extra DCG utilities
Taken from The Power of Prolog by Markus Triska
It's recommended to set the flag to write lists of characters as strings: