Hi I am parsing through XML files grabbing SQL text and paraments. I need to pull the strings that lie between two # signs. For example if this is my text:
CASE WHEN TRIM (NVL (a.SPLR_RMRK, ' ')) = '' OR TRIM (NVL (a.SPLR_RMRK, ' ')) IS NULL THEN '~' ELSE a.SPLR_RMRK END AS TXT_DESCR_J, 'PO' AS TXT_TYP_CD_J FROM #ps_RDW_Conn.jp_RDW_SCHEMA_NAME#.P_PO_RCPT_DTL a, (SELECT PO_RCPT_DTL_KEY, ETL_CRT_DTM FROM #ps_RDW_Conn.jp_RDW_SCHEMA_NAME#.#jp_PoRcptDtl_Src# WHERE ETL_UPDT_DTM > TO_DATE ('#jp_EtlPrcsDt#', 'YYYY-MM-DD:HH24:MI:SS'))
I want to have ps_RDW_Conn.jp_RDW_SCHEMA_NAME
, ps_RDW_Conn.jp_RDW_SCHEMA_NAME
jp_PoRcptDtl_Src
and jp_EtlPrcsDt
print out.
Some code that I have so far is
for eachLine in testFile:
print re.findall('#(*?)#', eachLine)
This gives me the following error:
nothing to repeat.
Any help or suggestions is greatly appreciated!