[erlang-questions] How can I break this string into a list of strings?

Lloyd R. Prentice <>
Thu Dec 29 06:27:26 CET 2016

Many thanks all for your excellent fodder for thought.

I would have thought that my question was trivial and the solution a well-worn path. But the issues are deeper than I imagined.

All the best in this new year,


Sent from my iPad

> On Dec 25, 2016, at 5:43 PM, Pierre Fenoll <> wrote:
> Hey Éric
> Well it's not clear whether tags are nested in the OP.
> So when my assumption applies, I would just read the list created 3 elements at a time, with strings of whitespace removed. 
> If it doesn't, regexps are known to not be able to parse stack based grammars. 
>> On 25 Dec 2016, at 21:41, Éric Pailleau <> wrote:
>> Hi Pierre,
>> No this way you are loosing html tags.
>> Lloyd wants to keep html tags, including linefeeds inside html tags.
>> I tested with re:split(Html, "(<[^>]+>[^<]*<[^>]+>)",[{return, list}]) .  Works. 
>> Lloyd can then loop on result and keep only non empty string after trim on elements. 
>> Regards 

More information about the erlang-questions mailing list