Re: text processing problem
- From: Maurice LING <mauriceling@xxxxxxx>
- Date: Fri, 08 Apr 2005 10:26:07 +1000
Matt wrote:
Try this: import re my_expr = re.compile(r'(\w+) (\(\1\))') s = "this is (is) a test" print my_expr.sub(r'\1', s) #prints 'this is a test'
M@
Thank you Matt. It works out well. The only think that gives it problem is in events as "there (there)", where between the word and the same bracketted word is more than one whitespaces...
Cheers Maurice .
- Follow-Ups:
- Re: text processing problem
- From: Matt
- Re: text processing problem
- References:
- text processing problem
- From: Maurice LING
- Re: text processing problem
- From: Matt
- text processing problem
- Prev by Date: wxwindows event function arguments
- Next by Date: extending event class in wxpython
- Previous by thread: Re: text processing problem
- Next by thread: Re: text processing problem
- Index(es):