"ish_ling" <ish_l...@yahoo.com> wrote
   'a b c<H d e f gH> h<H i j kH>'

I would like a regex to

Congratulations on a cclear explanation of what you want. With regex questions that is half the battle.

I have figured out how to do this in a multiple-step process

And there's nothing much wrong with multi step.

with re.findall() in order to find two strings
   ['d e f ', 'i j ']

I can then use another regex to extract the letters

But you don't need a regex to do that, it could be a list comprehension:

[ch for s in yourList for ch in s if ch != ' ' ]


HTH,


--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to