-2

I have a string

a='''S
LINC             SHORT LEGAL                                   TITLE NUMBER
0038 073 623     1522744;27                                    182 246 612 
+5

LEGAL DESCRIPTION
CONDOMINIUM PLAN 1522744  
UNIT 27  
AND 237 UNDIVIDED ONE TEN THOUSANDTH SHARES IN THE COMMON PROPERTY  
EXCEPTING THEREOUT ALL MINES AND MINERALS  

ESTATE: FEE SIMPLE  
ATS REFERENCE: 4;25;52;8;NW

MUNICIPALITY: CITY OF EDMONTON

REFERENCE NUMBER: 172 303 453 +7

---------------------------------------------------------------------------- 
----
         REGISTERED OWNER(S)
REGISTRATION    DATE(DMY)  DOCUMENT TYPE      VALUE           CONSIDERATION
---------------------------------------------------------------------------- 
----

182 246 612    01/10/2018  PHASED OF                           CASH & MTGE
                           CONDOMINIUM PLAN                    '''

I need to get the string after the word 'PHASED OF CONDOMINIUM PLAN' which should returns 'CASH & MTGE' I have tried using the below expression

date_value = (re.search(r'(\d+/\d+/\d+)', a)).group(1) //returns '01/10/2018'
doc_type = "".join(list(re.search(r"(?<={})\s*((?:\S+\s)+).*\s*((?:\S+\s)+)".format(date_value),a).group(1, 2))).strip() //returns 'PHASED OF CONDOMINIUM PLAN' 
consideration = ((re.search(r"(?<={}).*".format(doc_type),a)).group()).strip()

I could not get any match

0

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.