[Tutor] put? and files
Kent Johnson
kent37 at tds.net
Fri May 2 21:16:48 CEST 2008
On Fri, May 2, 2008 at 3:08 PM, Ross Glover <ross at ross.mayfirst.org> 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
More information about the Tutor
mailing list