Re: convert a string to a regex?

2009-11-20 Thread Diez B. Roggisch
Peng Yu schrieb: On Wed, Nov 18, 2009 at 9:12 PM, Tim Chase python.l...@tim.thechases.com wrote: There are many special characters listed on http://docs.python.org/library/re.html I'm wondering if there is a convenient function that can readily convert a string with the special characters to

convert a string to a regex?

2009-11-18 Thread Peng Yu
There are many special characters listed on http://docs.python.org/library/re.html I'm wondering if there is a convenient function that can readily convert a string with the special characters to its corresponding regex. For example, some.thing = some\.thing --

Re: convert a string to a regex?

2009-11-18 Thread Chris Rebert
On Wed, Nov 18, 2009 at 6:51 PM, Peng Yu pengyu...@gmail.com wrote: There are many special characters listed on http://docs.python.org/library/re.html I'm wondering if there is a convenient function that can readily convert a string with the special characters to its corresponding regex. For

Re: convert a string to a regex?

2009-11-18 Thread Tim Chase
There are many special characters listed on http://docs.python.org/library/re.html I'm wondering if there is a convenient function that can readily convert a string with the special characters to its corresponding regex. For example, some.thing = some\.thing Did you try bothering to *read*

Re: convert a string to a regex?

2009-11-18 Thread Peng Yu
On Wed, Nov 18, 2009 at 9:12 PM, Tim Chase python.l...@tim.thechases.com wrote: There are many special characters listed on http://docs.python.org/library/re.html I'm wondering if there is a convenient function that can readily convert a string with the special characters to its corresponding