Regex Match Problem
dmq at gain.com
Wed Mar 10 18:04:00 CET 2004
On 10 Mar 2004 07:17:12 -0800, bradwiseathome at hotmail.com (bdwise)
>I have this in my body tag:
>And I want to find a part between the semicolons that ends in focus()
>and remove the entire value between the semicolons.
>My Regular Expression looks like this but it is not matching, can
You need to escape the metacharacters. Try
Also, use a raw quote, so you don't have to escape the escapes.
Don't forget to set re.DOTALL if you want the '.*' to capture newlines
There is a nice interactive tool for testing these expressions at
There is a good intro to regular expressions at
More information about the Python-list