Thread: Regex help
View Single Post
Old Nov 20th, 2007, 3:03 PM   #1
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 855
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Regex help

Hi all,

I need some help with a regular expression. I need to match entire Python functions; so, beginning with "(\W+)def .*(.*):" I need to math the following line, assuming it begins with more whitespace the first line, and any following lines that begin with the same amount of whitespace as that line. I am not worried about one-liners and other details right now, just what I described.

Please help! I'm not even sure this is possible, but I hope it is.
titaniumdecoy is offline   Reply With Quote