28 Aug
2002
28 Aug
'02
3:40 p.m.
okay i figured it out, For those intersted ... text = "FreeBSD" reg_obj = re.compile('(.*)BSD') search_res = reg_obj.findall(text) print search_res[0] --brad On Fri, Aug 23, 2002 at 09:37:02PM -0400, Brad Noyes wrote:
Hi All,
I'm starting to learn python. I was looking for a python equivalent to a perl regular expression such as
$_ = "FreeBSD"; /(.*)BSD/;
where $1 would get what ever is between '(...)', 'Free' in this case.
Is there a way i can make use of the () regex operator in python? I can't seem to find an equivalent in python's regex module (re).
Thanks, --brad
_______________________________________________ Wlug mailing list Wlug@mail.wlug.org http://mail.wlug.org/mailman/listinfo/wlug