MRAB wrote:
> On 2015-08-18 22:42, Laurent Pointal wrote:
>> Hello,
>> ellipfind_re = re.compile(r"((?=\.\.\.)|…)", re.IGNORECASE|re.VERBOSE)
>> ellipfind_re.sub(' ... ',
>> "C'est un essai... avec différents caractères… pour voir.")
> (?=...) is a lookahead; a non-capture group is (?:..
On 2015-08-18 22:42, Laurent Pointal wrote:
Hello,
I want to make a replacement in a string, to ensure that ellipsis are
surrounded by spaces (this is not a typographycal problem, but a preparation
for late text chunking).
I tried with regular expressions and the SRE_Pattern.sub() method, but I
Hello,
I want to make a replacement in a string, to ensure that ellipsis are
surrounded by spaces (this is not a typographycal problem, but a preparation
for late text chunking).
I tried with regular expressions and the SRE_Pattern.sub() method, but I
have an unexpected duplication of the repl