A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/mrabarnett/mrab-regex/issues/249 below:

Add an option to regex.escape() to not escape spaces · Issue #249 · mrabarnett/mrab-regex · GitHub

Original report by kovidgoyal (Bitbucket: kovidgoyal, GitHub: kovidgoyal).

Recently, regex.escape() was changed to also escape spaces, because spaces are significant in VERBOSE patterns. However, escaping spaces is ugly when the escaped string is presented to a user for editing. Could you add another keyword argument to escape() to not escape spaces. So if the caller of escape() knows that the pattern is not going to be used with the VERBOSE flag, they can chosoe not to escape spaces.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4