Python Regex re.escape

By Xah Lee. Date: .
re.escape(text)
Return a string with a backslash character \ inserted in front of every non-alphanumeric character. This is useful if you want to use a given string as a pattern for exact match.

Python Regex Functions

Python Regular Expression

Python

Overview

Help

Comment

String

Arithmetic

Boolean

Conditional

Loop

Data Structure

Function and Class

Module

Misc

Regex

Text Processing

Web

Misc