Python re.search first accordance in the result
title: python re.search first accordance?

content:

I would like to get "begin print x;;;" in python by re.search from this:  
fv (x,y,z) begin print x;;; print y ;;; return x + y + z end;  
  
I tried this:    `begin = re.search("begin .+;;;", line)`    
  
But this put back the following string: begin print x;;; print y ;;;  
Any idea?
Python re.search first accordance in the result
===

title: python re.search first accordance?

content:

I would like to get "begin print x;;;" in python by re.search from this:  
fv (x,y,z) begin print x;;; print y ;;; return x + y + z end;  
  
I tried this:    `begin = re.search("begin .+;;;", line)`    
  
But this put back the following string: begin print x;;; print y ;;;  
Any idea?