A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/115905.html below:

Easy way to find set of quotes

Easy way to find set of quotesJeff Shipman shippy at nmt.edu
Tue Apr 24 12:28:55 EDT 2001
On Tue, 24 Apr 2001, Steve Purcell wrote:

> Jeff Shipman wrote:
> > I'm reading a file that has a kind of mark-up
> > language, and I'm supposed to convert it all
> > to HTML. No problem, really, it's no that
> > hard of a mark-up language, but there are a
> > couple things for which I'm sure python has
> > some tricks that would make life easier which
> > I don't know about.
>
> Sounds like a Wiki. Are we doing your homework?

A Wiki? And yes, this is for a Zero-Defect Software
Development project.

>
> > My question is: is there an easy way to find all
> > of these different patters and surround the proper
> > text? Note that things inside quotes are not
> > touched. So, if I had ""my '''text'''"", that
> > would output <BLOCKQUOTE>my '''text'''</BLOCKQUOTE>.
> > I know that python must have something handy for
> > this besides going through character-by-character
> > and keeping track of my current location.
>
> > Unfortunately, I'm not allowed to use regular expressions.
>
> Doh! This *is* your homework! Does this newsgroup query count as
> effective use of resources, or as unfair assistance? :-)
>

This would count as effective use of resources as I'm a
Senior, and I know how to program. :) I'm merely looking
for a hint or two, not a full blown-out code block.

> I'll restrain myself to the following hint: Look at the string module,
> specifically string.find().

I suppose I could do some weird python-fu with string.find().
Thanks for the hint.

> Good luck!

Thanks!

Jeff "Shippy" Shipman     E-Mail: shippy at nmt.edu
Computer Science Major    ICQ: 1786493
New Mexico Institute of Mining and Technology
Homepage: http://www.nmt.edu/~shippy



More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4