JPython - Problems using "re"

Stephen McColl sdm at dcs.ed.ac.uk
Wed Dec 8 06:59:36 EST 1999


hi there,

I've only been using JPython for a couple of weeks and have found it to be a great
language.  I've been trying to learn it and have been reasonably successfull but 
have come up against a problem using the "re" regular expression library.

In Python, there is an operation called "findall" that can be applied over a string,
and to quote the Python documentation..

findall(pattern, string) :

Return a list of all non-overlapping matches of pattern in string. If one or more
groups are present in the pattern, return a list of groups; this will be a list of 
tuples if the pattern has more than one group. Empty matches are included in the 
result. New in version 1.5.2.

But in JPython, (JPython 1.1 beta 4), "findall" isn't a method in the "re" module. 
Is there another way to produce the same result (scan a string and return a list of
all matches)?

Thanks for any help in advance.

stephen.

-- 
_________________________________________
stephen mccoll                                         sdm at dcs.ed.ac.uk
4th Year Computer Science, Edinburgh University
                                               



More information about the Python-list mailing list