7stud wrote:
> On Apr 18, 11:08 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
>> EMC ROY wrote:
>> > Original Sentence: An apple for you.
>> > Present: An apple for you .<.>
>> > Desire:An apple for you <.>.
>> >>> text = 'An apple for you .<.>'
>> >>> import re
>> >>> re.sub
On Apr 18, 11:08 pm, Steven Bethard <[EMAIL PROTECTED]> wrote:
> EMC ROY wrote:
> > Original Sentence: An apple for you.
> > Present: An apple for you .<.>
> > Desire:An apple for you <.>.
> >>> text = 'An apple for you .<.>'
> >>> import re
> >>> re.sub(r'(\S+)(<[^>]+>)(\s*)'
EMC ROY wrote:
> Original Sentence: An apple for you.
> Present: An apple for you .<.>
> Desire:An apple for you <.>.
>>> text = 'An apple for you .<.>'
>>> import re
>>> re.sub(r'(\S+)(<[^>]+>)(\s*)', r'\2\1\3', text)
'An apple for you <.>.'
--
http://mail.python.org/mailma