Search backward through a string using a regex (in Python)?

Posted by John Mulder on Stack Overflow See other posts from Stack Overflow or by John Mulder
Published on 2010-03-19T21:52:23Z Indexed on 2010/03/19 22:01 UTC
Read the original article Hit count: 214

Filed under:
|

I'm parsing some code and want to match the doxygen comments before a function. However, because I want to match for a specific function name, getting only the immediately previous comment is giving me problems.

Is there a way to search backward through a string using the Python Regex library?

Is there a better (easier) approach that I'm missing?

© Stack Overflow or respective owner

Related posts about python

Related posts about regex