George Burdell <gburde...@gmail.com> writes:

> I want to find every occurrence of "money," and for each occurrence, I
> want to scan back to the first occurrence of "hello." How can this be
> done?

By recognising the task: not expression matching, but lexing and
parsing. For which you might find the ‘pyparsing’ library of use
<URL:http://pyparsing.wikispaces.com/>.

-- 
 \         “Science is a way of trying not to fool yourself. The first |
  `\     principle is that you must not fool yourself, and you are the |
_o__)               easiest person to fool.” —Richard P. Feynman, 1964 |
Ben Finney
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to