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/067788.html below:

Easy way to find set of quotes

Easy way to find set of quotesSteve Purcell stephen_purcell at yahoo.com
Tue Apr 24 12:21:27 EDT 2001
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?

> 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? :-)

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

Good luck!

-Steve

-- 
Steve Purcell, Pythangelist
Get testing at http://pyunit.sourceforge.net/
Any opinions expressed herein are my own and not necessarily those of Yahoo


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