On Fri, May 2, 2008 at 3:08 PM, Ross Glover <[EMAIL PROTECTED]> wrote:
>  I'm assuming this falls under the rubric of text parsing.  Here's what I
> want to make:
>  A way to create a set of user defined tags or markers that can be applied
> to any section of a text document.  Then I want a function that will write
> to a file all of the tagged/marked text (that is text between tag_start and
> tag_end), preferably with a reference to the file from which it came.

You could do that with just string find and slicing but I think it
will be simpler with regular expressions. You can make a regex to
match everything from 'tag_start' to 'tag_end' and use a group to pull
out the stuff in between.

Kent
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to