Regex usage causing error with python > 3.6
See original GitHub issueThis function:
https://github.com/joepie91/python-whois/blob/7b0ddf755b3d706860d5d8cb80c598fd854a48ca/pythonwhois/parse.py#L203
causes an error re.error: bad escape \s at position 0
when using python > 3.6. You can try it here: https://wandbox.org/permlink/D6ZEUWfMIs7wYK77
Please note, that in python 3.7: “Unknown escapes consisting of '\’ and an ASCII letter in replacement templates for re.sub() were deprecated in Python 3.5, and will now cause an error.” (https://docs.python.org/3/whatsnew/3.7.html).
It seems that that’s the only problem with python > 3.6.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:6
- Comments:6
Top Results From Across the Web
Regular expression split fails on 3.6 and not 2.7 or 3.7+
I am receiving an unexpected behavior in using regular expressions for splitting a string. It seems like this error exists in `python 3.6` ......
Read more >6.2. re — Regular expression operations — Python 3.6.3 ...
Specifies that exactly m copies of the previous RE should be matched; fewer matches cause the entire RE not to match. For example,...
Read more >Invalid syntax using regular expression in python 3.6.8
regular expression working in mac but giving error in linux. Linux has all python package but version is different.
Read more >An Empirical Study on Regular Expression Bugs - Chris Brown
Since Python version 3.6, re.LOCALE can be used only with bytes patterns. ... the root cause is the regex, the regex itself caused...
Read more >Python re Module - Regex Support - Regular-Expressions.info
Python's re module can use Unicode strings. So you could pass the Unicode string u"\u00E0\\d" to the re module to match à followed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ended up doing it this way:
i have this issue too!