Revision 5348
Added by Aaron Marcuse-Kubitza over 12 years ago
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
Added regexp.py