Function global_substitute - Global substitution function.
SYNOPSIS
import HTMLutil
def global_substitute(search_func, repl_func, s)
DESCRIPTION
Returns a new string after having the repl_func process the text
found by the search_func.
- search_func
- A function which takes a string and a starting index
and returns a tuple of the beginning and ending index
where a text pattern is found. Should return (None, None)
if nothing is found.
- repl_func
- A function which takes a string and returns a new string
which has been processed in some way (ie.,marked up).
- s
- The string to act on.
SEE ALSO
HTMLutil
Copyright © 1996-9 Robin Friedrich
All Rights Reserved
Comments to author: friedrich@pythonpros.com
Generated: Tue Apr 20, 1999