On Oct 31, 1:25 pm, netimen <[EMAIL PROTECTED]> wrote:
> I have a text containing brackets (or what is the correct term for
> '>'?). I'd like to match text in the uppermost level of brackets.
>
> So, I have sth like: 'aaaa 123 < 1 aaa < t bbb < a <tt  > ff > > 2 >
> bbbbb'. How to match text between the uppermost brackets ( 1 aaa < t
> bbb < a <tt  > ff > > 2 )?
>
> P.S. sorry for my english.

I think this is what you're looking for:

In [11]: re.compile('\<(.*)\>').findall('aaaa 123 < 1 aaa < t bbb < a
<tt  > ff > > 2 > bbbbb')
Out[11]: [' 1 aaa < t bbb < a <tt  > ff > > 2 ']
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to