Python regex pattern from array of hex chars
Joseph L. Casale
jcasale at activenetwerx.com
Fri Apr 13 14:50:15 EDT 2018
-----Original Message-----
From: Python-list <python-list-
bounces+jcasale=activenetwerx.com at python.org> On Behalf Of MRAB
Sent: Friday, April 13, 2018 12:05 PM
To: python-list at python.org
Subject: Re: Python regex pattern from array of hex chars
> Use re.escape:
>
> regex = re.compile('[^{}]+'.format(re.escape(''.join(c for c in
> character_class))))
Brilliant, thanks!
More information about the Python-list
mailing list