diff options
Diffstat (limited to 'en/pythonpath/lightproof_impl_en.py')
-rw-r--r-- | en/pythonpath/lightproof_impl_en.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/en/pythonpath/lightproof_impl_en.py b/en/pythonpath/lightproof_impl_en.py index ac668dc..06d44a6 100644 --- a/en/pythonpath/lightproof_impl_en.py +++ b/en/pythonpath/lightproof_impl_en.py @@ -123,14 +123,14 @@ def suggest(rLoc, word): # get the nth word of the input string or None def word(s, n): - a = re.match("(?u)( [-.\w%%]+){" + str(n-1) + "}( [-.\w%%]+)", s) + a = re.match("(?u)( [-.\\w%%]+){" + str(n-1) + "}( [-.\\w%%]+)", s) if not a: return '' return a.group(2)[1:] # get the (-)nth word of the input string or None def wordmin(s, n): - a = re.search("(?u)([-.\w%%]+ )([-.\w%%]+ ){" + str(n-1) + "}$", s) + a = re.search("(?u)([-.\\w%%]+ )([-.\\w%%]+ ){" + str(n-1) + "}$", s) if not a: return '' return a.group(1)[:-1] |