[Zope] Finding a phone number in a python script

Schmidt, Allen J. aschmidt@nvcc.edu
Thu, 24 Oct 2002 07:32:03 -0400


I have a block of text that contains a phone number in the format of
888/123-4567 and I need to identify that sequence when it occurs and somehow
extract it, and return it to Zope without the slash or the dash.

Without regex in Python scripts, is there any way to do this? 

Thanks

-Allen

"Long live DTML!" (just starting learning Python)

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Andreas Tille
Sent: Thursday, October 24, 2002 6:52 AM
To: Zope user list
Subject: [Zope] Re: Exsternal method quote


On Wed, 23 Oct 2002, Dieter Maurer wrote:

> Projekt01, Roger Ineichen writes:
>  > What can I do if I whould return html code frome a external method?
>  > It always quote the return string
> It seems that you are calling your external method from ZPT.
>
> In this case, you must use "structure" in from of your call.
Is there any equivalent for this for Python Scripts?

For certain reasons I use a script which returns a complete
HTML-page.  This Script calls another Script which parses some
parameters and returns the contents of a file object of the ZODB.

I plan to convert these files to structured text for easier user
handling but currently this file contains HTML.  I observed that
also in a python script all HTML is quoted.  Any hint how to
prevent that?

Kind regards

          Andreas.


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )