# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"Sour.*?(.|[\n])*?; "
test_str = ("PRINT 'SII Sales SIINZ0:' + convert(varchar(30),sysdatetime())\n"
"GO\n"
"INSERT INTO [Garda Import$SII Sales SIINZ0$99cac736-796d-4e93-9367-9d7937636b2b] SET\n"
"[ID Version SII] = Sour.[IDVersionSII]\n"
",[Emp_Reason Name] = Sour.[Emp_NombreRazon]\n"
",[Emp_VAT Reg_ No_ Rep_] = Sour.[Emp_NIFRepresentante]\n"
",[Emp_VAT Registration No_] = Sour.[Emp_NIF]\n"
",[Communication Type] = Sour.[TipoComunicacion]\n"
",[Financial Year] = Sour.[Ejercicio]\n"
",[Period] = Sour.[Periodo]\n"
",[Special Entry] = Sour.[Special Entry]\n"
",[Status] = Sour.[Status]\n"
",[Export Date] = Sour.[Export Date]\n"
",[Export User] = Sour.[Export User]\n"
",[Document Type] = Sour.[Document Type]\n"
",[Customer No_] = Sour.[Customer No_]\n"
",[Country Code] = Sour.[Country Code]\n"
",[Service Detail] = Sour.[Service Detail]\n"
",[AEAT Status] = Sour.[AEAT Status]\n"
",[Processed] = Sour.[Processed]\n"
",[File Export] = Sour.[File Export]\n"
",[Last Update] = Sour.[Last Update]\n"
",[Export Blocked] = Sour.[Export blocked]\n"
",[ID Issuing Invoice] = Sour.[IDEmisorFactura]\n"
",[Issuing Invoice No_ Serie] = Sour.[NumSerieFacturaEmisor]\n"
",[Ending Issuing Inv_ No_ Serie] = Sour.[NumSerieFacturaEmisorFin]\n"
",[Issuing Invoice Issue Date] = Sour.[FechaExpedicionFacturaEmisor]\n"
",[Invoice Type] = Sour.[TipoFactura]\n"
",[Corrective Type] = Sour.[TipoRectificativa]\n"
",[Agr_Issuing Invoice No_ Serie] = Sour.[Agr_NumSerieFacturaEmisor]\n"
",[Agr_Issuing Invoice Issue Date] = Sour.[Agr_FechaExpedicionFacturaEmi]\n"
",[Rec_Issuing Invoice No_ Serie] = Sour.[Rec_NumSerieFacturaEmisor]\n"
",[Rec_Issuing Invoice Issue Date] = Sour.[Rec_FechaExpedicionFacturaEmi]\n"
",[Corrective Base] = Sour.[BaseRectificada]\n"
",[Corrected Fee] = Sour.[CuotaRectificada]\n"
",[Corrected Surcharge Fee] = Sour.[CuotaRecargoRectificada]\n"
",[Operation Date] = Sour.[FechaOperación]\n"
",[Special Reg_ or Transc_ Key] = Sour.[ClaveRegimenEspecialOTrascende]\n"
",[Special Reg_ or Transc_ Key 1] = Sour.[ClaveRegimenEspecialOTrascend1]\n"
",[Special Reg_ or Transc_ Key 2] = Sour.[ClaveRegimenEspecialOTrascend2]\n"
",[Invoicing Agreement Reg_ No_] = Sour.[NumRegistroAcuerdoFacturacion]\n"
",[Total Amount] = Sour.[ImporteTotal]\n"
",[Tax Base at Cost] = Sour.[BaseImponibleAcoste]\n"
",[Operation Description] = Sour.[DescripciónOperación]\n"
",[Property Situation] = Sour.[SituaciónInmueble]\n"
",[Cadastre Refference] = Sour.[ReferenciaCatastral]\n"
",[Transfer Amount Subject to VAT] = Sour.[ImporteTransimisiónSujetoAIVA]\n"
",[External Emission] = Sour.[EmitidaPorTerceros]\n"
",[Various Recipients] = Sour.[VariosDestinatarios]\n"
",[Coupon] = Sour.[Cupon]\n"
",[Simplified Invoice] = Sour.[Simplified Invoice]\n"
",[Reason Name] = Sour.[NombreRazón]\n"
",[VAT Reg_ No_ Representative] = Sour.[NIFRepresentante]\n"
",[VAT Registration No_] = Sour.[NIF]\n"
",[IDOther] = Sour.[IDOtro]\n"
",[IDType] = Sour.[IDType]\n"
",[ID_IDOther] = Sour.[ID_IDOtro]\n"
",[Exemption Cause] = Sour.[CausaExencion]\n"
",[Ex_TaxBase] = Sour.[Ex_BaseImponible]\n"
",[Non-Exempt Type] = Sour.[TipoNoExenta]\n"
",[NoEx_TaxRate1] = Sour.[NoEx_TipoImpositivo1]\n"
",[NoEx_TaxBase1] = Sour.[NoEx_BaseImponible1]\n"
",[NoEx_ChargedFee1] = Sour.[NoEx_CuotaRepercutida1]\n"
",[NoEx_EquivalenceSurchargeType1] = Sour.[NoEx_TipoRecargoEquivalencia1]\n"
",[NoEx_EquivalenceSurchargeFee1] = Sour.[NoEx_CuotaRecargoEquivalencia1]\n"
",[NoEx_TaxRate2] = Sour.[NoEx_TipoImpositivo2]\n"
",[NoEx_TaxBase2] = Sour.[NoEx_BaseImponible2]\n"
",[NoEx_ChargedFee2] = Sour.[NoEx_CuotaRepercutida2]\n"
",[NoEx_EquivalenceSurchargeType2] = Sour.[NoEx_TipoRecargoEquivalencia2]\n"
",[NoEx_EquivalenceSurchargeFee2] = Sour.[NoEx_CuotaRecargoEquivalencia2]\n"
",[NoEx_TaxRate3] = Sour.[NoEx_TipoImpositivo3]\n"
",[NoEx_TaxBase3] = Sour.[NoEx_BaseImponible3]\n"
",[NoEx_ChargedFee3] = Sour.[NoEx_CuotaRepercutida3]\n"
",[NoEx_EquivalenceSurchargeType3] = Sour.[NoEx_TipoRecargoEquivalencia3]\n"
",[NoEx_EquivalenceSurchargeFee3] = Sour.[NoEx_CuotaRecargoEquivalencia3]\n"
",[NoEx_TaxRate4] = Sour.[NoEx_TipoImpositivo4]\n"
",[NoEx_TaxBase4] = Sour.[NoEx_BaseImponible4]\n"
",[NoEx_ChargedFee4] = Sour.[NoEx_CuotaRepercutida4]\n"
",[NoEx_EquivalenceSurchargeType4] = Sour.[NoEx_TipoRecargoEquivalencia4]\n"
",[NoEx_EquivalenceSurchargeFee4] = Sour.[NoEx_CuotaRecargoEquivalencia4]\n"
",[Amount Per Art_ 7_14 Others] = Sour.[ImportePorArticulos7_14_Otros]\n"
",[NS_TAI] = Sour.[NS_TAI]\n"
",[Ser_Exemption Cause] = Sour.[Ser_CausaExencion]\n"
",[Ser_Ex_TaxBase] = Sour.[Ser_Ex_BaseImponible]\n"
",[Ser_NS_TAI] = Sour.[Ser_NS_TAI]\n"
",[Ser_Amt Per Art_ 7_14 Others] = Sour.[Ser_ImportePorArticulos7_14_O]\n"
",[Ser_Non-Exempt Type] = Sour.[Ser_TipoNoExenta]\n"
",[Ser_NoEx_TaxRate1] = Sour.[Ser_NoEx_TipoImpositivo1]\n"
",[Ser_NoEx_TaxBase1] = Sour.[Ser_NoEx_BaseImponible1]\n"
",[Ser_NoEx_ChargedFee1] = Sour.[Ser_NoEx_CuotaRepercutida1]\n"
",[Ser_NoEx_EquivSurchargeType1] = Sour.[Ser_NoEx_TipoRecargoEquival1]\n"
",[Ser_NoEx_EquivSurchargeFee1] = Sour.[Ser_NoEx_CuotaRecargoEquival1]\n"
",[Ser_NoEx_TaxRate2] = Sour.[Ser_NoEx_TipoImpositivo2]\n"
",[Ser_NoEx_TaxBase2] = Sour.[Ser_NoEx_BaseImponible2]\n"
",[Ser_NoEx_ChargedFee2] = Sour.[Ser_NoEx_CuotaRepercutida2]\n"
",[Ser_NoEx_EquivSurchargeType2] = Sour.[Ser_NoEx_TipoRecargoEquival2]\n"
",[Ser_NoEx_EquivSurchargeFee2] = Sour.[Ser_NoEx_CuotaRecargoEquival2]\n"
",[Ser_NoEx_TaxRate3] = Sour.[Ser_NoEx_TipoImpositivo3]\n"
",[Ser_NoEx_TaxBase3] = Sour.[Ser_NoEx_BaseImponible3]\n"
",[Ser_NoEx_ChargedFee3] = Sour.[Ser_NoEx_CuotaRepercutida3]\n"
",[Ser_NoEx_EquivSurchargeType3] = Sour.[Ser_NoEx_TipoRecargoEquival3]\n"
",[Ser_NoEx_EquivSurchargeFee3] = Sour.[Ser_NoEx_CuotaRecargoEquival3]\n"
",[Ent_NoEx_TaxRate1] = Sour.[Ent_NoEx_TipoImpositivo1]\n"
",[Ent_NoEx_TaxBase1] = Sour.[Ent_NoEx_BaseImponible1]\n"
",[Ent_NoEx_ChargedFee1] = Sour.[Ent_NoEx_CuotaRepercutida1]\n"
",[Ent_NoEx_EquivSurchargeType1] = Sour.[Ent_NoEx_TipoRecargoEquival1]\n"
",[Ent_NoEx_EquivSurchargeFee1] = Sour.[Ent_NoEx_CuotaRecargoEquival1]\n"
",[Ent_NoEx_TaxRate2] = Sour.[Ent_NoEx_TipoImpositivo2]\n"
",[Ent_NoEx_TaxBase2] = Sour.[Ent_NoEx_BaseImponible2]\n"
",[Ent_NoEx_ChargedFee2] = Sour.[Ent_NoEx_CuotaRepercutida2]\n"
",[Ent_NoEx_EquivSurchargeType2] = Sour.[Ent_NoEx_TipoRecargoEquival2]\n"
",[Ent_NoEx_EquivSurchargeFee2] = Sour.[Ent_NoEx_CuotaRecargoEquival2]\n"
",[Ent_NoEx_TaxRate3] = Sour.[Ent_NoEx_TipoImpositivo3]\n"
",[Ent_NoEx_TaxBase3] = Sour.[Ent_NoEx_BaseImponible3]\n"
",[Ent_NoEx_ChargedFee3] = Sour.[Ent_NoEx_CuotaRepercutida3]\n"
",[Ent_NoEx_EquivSurchargeType3] = Sour.[Ent_NoEx_TipoRecargoEquival3]\n"
",[Ent_NoEx_EquivSurchargeFee3] = Sour.[Ent_NoEx_CuotaRecargoEquival3]\n"
",[Ent_Amt Per Art_ 7_14 Others] = Sour.[Ent_ImportePorArticulos7_14_O]\n"
",[Ent_NS_TAI] = Sour.[Ent_NS_TAI]\n"
",[Ent_Exemption Cause] = Sour.[Ent_CausaExencion]\n"
",[Ent_Ex_TaxBase] = Sour.[Ent_Ex_BaseImponible]\n"
",[Ent_Non-Exempt Type] \n"
",[Payment Date] \n"
",[Payment Amount] \n"
",[Payment Method] \n"
",[Payment Method or Account] \n"
",[TIMESTAMP Response] \n"
",[VAT Reg_ No_ Presenter] \n"
",[IDSUMPROPIO] \n"
",[CSV Associated]\n"
",[DESCERROR] \n"
",[AEAT Validated] \n"
",[External Ref]\n"
",[Entity Happened] \n"
",[Macrodata] \n"
",[RegPrevioGGEEoREDEMEoCompe] = Sour.[RegPrevioGGEEoREDEMEoCompe]\n"
",[Simplified Type] = Sour.[Simplified Type]\n"
" FROM [Garda Import$SII Sales SIINZ0$99cac736-796d-4e93-9367-9d7937636b2b] Dest JOIN [Garda Import$KIL SII Sales$b1647a94-b3a3-4659-a6ca-5e8eeb40b71f] Sour ON \n"
"Dest.[Entry No_] = Sour.[Entry No_];\n"
"GO\n"
"UPDATE [TREMERLI$SII Sales SIINZ0$99cac736-796d-4e93-9367-9d7937636b2b] SET\n"
"[ID Version SII] = Sour.[IDVersionSII]\n"
",[Emp_Reason Name] = Sour.[Emp_NombreRazon]\n"
",[Emp_VAT Reg_ No_ Rep_] = Sour.[Emp_NIFRepresentante]\n"
",[Emp_VAT Registration No_] = Sour.[Emp_NIF]\n"
",[Communication Type] = Sour.[TipoComunicacion]\n"
",[Financial Year] = Sour.[Ejercicio]\n"
",[Period] = Sour.[Periodo]\n"
",[Special Entry] = Sour.[Special Entry]\n"
",[Status] = Sour.[Status]\n"
",[Export Date] = Sour.[Export Date]\n"
",[Export User] = Sour.[Export User]\n"
",[Document Type] = Sour.[Document Type]\n"
",[Customer No_] = Sour.[Customer No_]\n"
",[Country Code] = Sour.[Country Code]\n"
",[Service Detail] = Sour.[Service Detail]\n"
",[AEAT Status] = Sour.[AEAT Status]\n"
",[Processed] = Sour.[Processed]\n"
",[File Export] = Sour.[File Export]\n"
",[Last Update] = Sour.[Last Update]\n"
",[Export Blocked] = Sour.[Export blocked]\n"
",[ID Issuing Invoice] = Sour.[IDEmisorFactura]\n"
",[Issuing Invoice No_ Serie] = Sour.[NumSerieFacturaEmisor]\n"
",[Ending Issuing Inv_ No_ Serie] = Sour.[NumSerieFacturaEmisorFin]\n"
",[Issuing Invoice Issue Date] = Sour.[FechaExpedicionFacturaEmisor]\n"
",[Invoice Type] = Sour.[TipoFactura]\n"
",[Corrective Type] = Sour.[TipoRectificativa]\n"
",[Agr_Issuing Invoice No_ Serie] = Sour.[Agr_NumSerieFacturaEmisor]\n"
",[Agr_Issuing Invoice Issue Date] = Sour.[Agr_FechaExpedicionFacturaEmi]\n"
",[Rec_Issuing Invoice No_ Serie] = Sour.[Rec_NumSerieFacturaEmisor]\n"
",[Rec_Issuing Invoice Issue Date] = Sour.[Rec_FechaExpedicionFacturaEmi]\n"
",[Corrective Base] = Sour.[BaseRectificada]\n"
",[Corrected Fee] = Sour.[CuotaRectificada]\n"
",[Corrected Surcharge Fee] = Sour.[CuotaRecargoRectificada]\n"
",[Operation Date] = Sour.[FechaOperación]\n"
",[Special Reg_ or Transc_ Key] = Sour.[ClaveRegimenEspecialOTrascende]\n"
",[Special Reg_ or Transc_ Key 1] = Sour.[ClaveRegimenEspecialOTrascend1]\n"
",[Special Reg_ or Transc_ Key 2] = Sour.[ClaveRegimenEspecialOTrascend2]\n"
",[Invoicing Agreement Reg_ No_] = Sour.[NumRegistroAcuerdoFacturacion]\n"
",[Total Amount] = Sour.[ImporteTotal]\n"
",[Tax Base at Cost] = Sour.[BaseImponibleAcoste]\n"
",[Operation Description] = Sour.[DescripciónOperación]\n"
",[Property Situation] = Sour.[SituaciónInmueble]\n"
",[Cadastre Refference] = Sour.[ReferenciaCatastral]\n"
",[Transfer Amount Subject to VAT] = Sour.[ImporteTransimisiónSujetoAIVA]\n"
",[External Emission] = Sour.[EmitidaPorTerceros]\n"
",[Various Recipients] = Sour.[VariosDestinatarios]\n"
",[Coupon] = Sour.[Cupon]\n"
",[Simplified Invoice] = Sour.[Simplified Invoice]\n"
",[Reason Name] = Sour.[NombreRazón]\n"
",[VAT Reg_ No_ Representative] = Sour.[NIFRepresentante]\n"
",[VAT Registration No_] = Sour.[NIF]\n"
",[IDOther] = Sour.[IDOtro]\n"
",[IDType] = Sour.[IDType]\n"
",[ID_IDOther] = Sour.[ID_IDOtro]\n"
",[Exemption Cause] = Sour.[CausaExencion]\n"
",[Ex_TaxBase] = Sour.[Ex_BaseImponible]\n"
",[Non-Exempt Type] = Sour.[TipoNoExenta]\n"
",[NoEx_TaxRate1] = Sour.[NoEx_TipoImpositivo1]\n"
",[NoEx_TaxBase1] = Sour.[NoEx_BaseImponible1]\n"
",[NoEx_ChargedFee1] = Sour.[NoEx_CuotaRepercutida1]\n"
",[NoEx_EquivalenceSurchargeType1] = Sour.[NoEx_TipoRecargoEquivalencia1]\n"
",[NoEx_EquivalenceSurchargeFee1] = Sour.[NoEx_CuotaRecargoEquivalencia1]\n"
",[NoEx_TaxRate2] = Sour.[NoEx_TipoImpositivo2]\n"
",[NoEx_TaxBase2] = Sour.[NoEx_BaseImponible2]\n"
",[NoEx_ChargedFee2] = Sour.[NoEx_CuotaRepercutida2]\n"
",[NoEx_EquivalenceSurchargeType2] = Sour.[NoEx_TipoRecargoEquivalencia2]\n"
",[NoEx_EquivalenceSurchargeFee2] = Sour.[NoEx_CuotaRecargoEquivalencia2]\n"
",[NoEx_TaxRate3] = Sour.[NoEx_TipoImpositivo3]\n"
",[NoEx_TaxBase3] = Sour.[NoEx_BaseImponible3]\n"
",[NoEx_ChargedFee3] = Sour.[NoEx_CuotaRepercutida3]\n"
",[NoEx_EquivalenceSurchargeType3] = Sour.[NoEx_TipoRecargoEquivalencia3]\n"
",[NoEx_EquivalenceSurchargeFee3] = Sour.[NoEx_CuotaRecargoEquivalencia3]\n"
",[NoEx_TaxRate4] = Sour.[NoEx_TipoImpositivo4]\n"
",[NoEx_TaxBase4] = Sour.[NoEx_BaseImponible4]\n"
",[NoEx_ChargedFee4] = Sour.[NoEx_CuotaRepercutida4]\n"
",[NoEx_EquivalenceSurchargeType4] = Sour.[NoEx_TipoRecargoEquivalencia4]\n"
",[NoEx_EquivalenceSurchargeFee4] = Sour.[NoEx_CuotaRecargoEquivalencia4]\n"
",[Amount Per Art_ 7_14 Others] = Sour.[ImportePorArticulos7_14_Otros]\n"
",[NS_TAI] = Sour.[NS_TAI]\n"
",[Ser_Exemption Cause] = Sour.[Ser_CausaExencion]\n"
",[Ser_Ex_TaxBase] = Sour.[Ser_Ex_BaseImponible]\n"
",[Ser_NS_TAI] = Sour.[Ser_NS_TAI]\n"
",[Ser_Amt Per Art_ 7_14 Others] = Sour.[Ser_ImportePorArticulos7_14_O]\n"
",[Ser_Non-Exempt Type] = Sour.[Ser_TipoNoExenta]\n"
",[Ser_NoEx_TaxRate1] = Sour.[Ser_NoEx_TipoImpositivo1]\n"
",[Ser_NoEx_TaxBase1] = Sour.[Ser_NoEx_BaseImponible1]\n"
",[Ser_NoEx_ChargedFee1] = Sour.[Ser_NoEx_CuotaRepercutida1]\n"
",[Ser_NoEx_EquivSurchargeType1] = Sour.[Ser_NoEx_TipoRecargoEquival1]\n"
",[Ser_NoEx_EquivSurchargeFee1] = Sour.[Ser_NoEx_CuotaRecargoEquival1]\n"
",[Ser_NoEx_TaxRate2] = Sour.[Ser_NoEx_TipoImpositivo2]\n"
",[Ser_NoEx_TaxBase2] = Sour.[Ser_NoEx_BaseImponible2]\n"
",[Ser_NoEx_ChargedFee2] = Sour.[Ser_NoEx_CuotaRepercutida2]\n"
",[Ser_NoEx_EquivSurchargeType2] = Sour.[Ser_NoEx_TipoRecargoEquival2]\n"
",[Ser_NoEx_EquivSurchargeFee2] = Sour.[Ser_NoEx_CuotaRecargoEquival2]\n"
",[Ser_NoEx_TaxRate3] = Sour.[Ser_NoEx_TipoImpositivo3]\n"
",[Ser_NoEx_TaxBase3] = Sour.[Ser_NoEx_BaseImponible3]\n"
",[Ser_NoEx_ChargedFee3] = Sour.[Ser_NoEx_CuotaRepercutida3]\n"
",[Ser_NoEx_EquivSurchargeType3] = Sour.[Ser_NoEx_TipoRecargoEquival3]\n"
",[Ser_NoEx_EquivSurchargeFee3] = Sour.[Ser_NoEx_CuotaRecargoEquival3]\n"
",[Ent_NoEx_TaxRate1] = Sour.[Ent_NoEx_TipoImpositivo1]\n"
",[Ent_NoEx_TaxBase1] = Sour.[Ent_NoEx_BaseImponible1]\n"
",[Ent_NoEx_ChargedFee1] = Sour.[Ent_NoEx_CuotaRepercutida1]\n"
",[Ent_NoEx_EquivSurchargeType1] = Sour.[Ent_NoEx_TipoRecargoEquival1]\n"
",[Ent_NoEx_EquivSurchargeFee1] = Sour.[Ent_NoEx_CuotaRecargoEquival1]\n"
",[Ent_NoEx_TaxRate2] = Sour.[Ent_NoEx_TipoImpositivo2]\n"
",[Ent_NoEx_TaxBase2] = Sour.[Ent_NoEx_BaseImponible2]\n"
",[Ent_NoEx_ChargedFee2] = Sour.[Ent_NoEx_CuotaRepercutida2]\n"
",[Ent_NoEx_EquivSurchargeType2] = Sour.[Ent_NoEx_TipoRecargoEquival2]\n"
",[Ent_NoEx_EquivSurchargeFee2] = Sour.[Ent_NoEx_CuotaRecargoEquival2]\n"
",[Ent_NoEx_TaxRate3] = Sour.[Ent_NoEx_TipoImpositivo3]\n"
",[Ent_NoEx_TaxBase3] = Sour.[Ent_NoEx_BaseImponible3]\n"
",[Ent_NoEx_ChargedFee3] = Sour.[Ent_NoEx_CuotaRepercutida3]\n"
",[Ent_NoEx_EquivSurchargeType3] = Sour.[Ent_NoEx_TipoRecargoEquival3]\n"
",[Ent_NoEx_EquivSurchargeFee3] = Sour.[Ent_NoEx_CuotaRecargoEquival3]\n"
",[Ent_Amt Per Art_ 7_14 Others] = Sour.[Ent_ImportePorArticulos7_14_O]\n"
",[Ent_NS_TAI] = Sour.[Ent_NS_TAI]\n"
",[Ent_Exemption Cause] = Sour.[Ent_CausaExencion]\n"
",[Ent_Ex_TaxBase] = Sour.[Ent_Ex_BaseImponible]\n"
",[Ent_Non-Exempt Type] = Sour.[Ent_TipoNoExenta]\n"
",[Payment Date] = Sour.[Payment Date]\n"
",[Payment Amount] = Sour.[Payment Amount]\n"
",[Payment Method] = Sour.[MedioCobro]\n"
",[Payment Method or Account] = Sour.[Cuenta_O_Medio]\n"
",[TIMESTAMP Response] = Sour.[TIMESTAMP response]\n"
",[VAT Reg_ No_ Presenter] = Sour.[NIFPRESENTADOR]\n"
",[IDSUMPROPIO] = Sour.[IDSUMPROPIO]\n"
",[CSV Associated] = Sour.[CSVASOCIADO]\n"
",[DESCERROR] = Sour.[DESCERROR]\n"
",[AEAT Validated] = Sour.[Validado AEAT]\n"
",[External Ref] = Sour.[RefExterna]\n"
",[Entity Happened] = Sour.[EntidadSucedida]\n"
",[Macrodata] = Sour.[Macrodato]\n"
",[RegPrevioGGEEoREDEMEoCompe] = Sour.[RegPrevioGGEEoREDEMEoCompe]\n"
",[Simplified Type] = Sour.[Simplified Type]\n"
" FROM [TREMERLI$SII Sales SIINZ0$99cac736-796d-4e93-9367-9d7937636b2b] Dest JOIN [TREMERLI$KIL SII Sales$b1647a94-b3a3-4659-a6ca-5e8eeb40b71f] Sour ON \n"
"Dest.[Entry No_] = Sour.[Entry No_];\n"
"GO")
matches = re.search(regex, test_str, re.MULTILINE | re.IGNORECASE)
if matches:
print ("Match was found at {start}-{end}: {match}".format(start = matches.start(), end = matches.end(), match = matches.group()))
for groupNum in range(0, len(matches.groups())):
groupNum = groupNum + 1
print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = matches.start(groupNum), end = matches.end(groupNum), group = matches.group(groupNum)))
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html