RE: Self referential regular expressions with burried bindings.

Jaap Vermeulen (jaap@sequent.com)
Wed, 09 Mar 94 15:43:00 PST

| I want to pull every two characters following % characters out of a
string.
...
| Also, if that won't work, what is the nicest way to accomplish this?

| >>> print a
| asdfasf%12sas%44

>>> import string
>>> two_char = []
>>> for item in string.splitfields(a, '%')[1:]:
... two_char.append(item[:2])
...
>>> two_char
['12', '44']
>>>

-Jaap-