Convert all remaining *simple* cases of regex usage to re usage.
diff --git a/Lib/fmt.py b/Lib/fmt.py
index f7c2718..3f146cb 100644
--- a/Lib/fmt.py
+++ b/Lib/fmt.py
@@ -461,9 +461,9 @@
self.paralist[para2].invert(d, pos1, pos2)
#
def search(self, prog):
- import regex, string
+ import re, string
if type(prog) == type(''):
- prog = regex.compile(string.lower(prog))
+ prog = re.compile(string.lower(prog))
if self.selection:
iold = self.selection[0][0]
else:
@@ -474,8 +474,9 @@
continue
p = self.paralist[i]
text = string.lower(p.extract())
- if prog.search(text) >= 0:
- a, b = prog.regs[0]
+ match = prog.search(text)
+ if match:
+ a, b = match.group(0)
long1 = i, a
long2 = i, b
hit = long1, long2