Project

General

Profile

« Previous | Next » 

Revision 5348

Added regexp.py

View differences:

lib/regexp.py
1
# Regular expression processing
2

  
3
import re
4

  
5
def sub_nested(re_, repl, str_):
6
    while True:
7
        str_, n = re.subn(re_, repl, str_)
8
        if n == 0: break
9
    return str_

Also available in: Unified diff