Re: regular expressions...

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Mon, 1 Aug 1994 16:44:13 -0400

BTW: I just couldn't seem to be able to figure out the regex syntax to
match any char including newline, so I used the translate parameter of
regex compile to map newline to space ( as well as case folding ):

cf = regex.casefold
nl = ord('\n')
cf = cf[:nl] + ' ' + cf[nl+1:]
bodypat = regex.compile( '<BODY>.*</BODY>', cf )

This seems to work well enough, but if anyone happens to know the
magic incantation to match ( meta('.') OR meta('$') ), please let
me know. I must have tried a dozen variations of escapes and I
just couldn't seem to find something that works.

- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics