Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python RegEx Escape – re.escape()

import re

# escape() returns a string with BackSlash '', before every Non-Alphanumeric Character In 1st case only ' ', is not alphanumeric In 2nd case, ' ', caret '^', '-', '[]', '' are not alphanumeric
print(re.escape("This is Awesome even 1 AM"))
print(re.escape("I Asked what is this [a-9], he said 	 ^WoW"))
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #Python #RegEx #Escape
ADD COMMENT
Topic
Name
4+9 =