Re: Self referential regular expressions with burried bindings.

Nick Seidenman (nick@osg.saic.com)
Wed, 9 Mar 1994 18:23:28 -0500 (EST)

David Williams writes:
> I want to pull every two characters following % characters out of a string.
> I tried this:
>
> >>> print a
> asdfasf%12sas%44
> >>> t=regex.compile('\(.*%\(..\).*\)*')
> >>> t.match(a)
> 16
> >>>
> >>> t.group(1,2)
> ('', '44')

This looks suspiciously like he wants to do http decoding. I think
there are lots of us out here who have similar masochistic tendencies
and a thread wherein we post our solutions is in order, no?

Nick

-------------------------------------------------------------------------------
Nick Seidenman nick@osg.saic.com
SAIC (703) 734-5561
1710 Goodridge Drive MS 1-11-1
McLean, VA 22102 Rm 11-180