use strict;
my $str = 'CLINICA LAS UBNDES S.A. R.U.T.: 93.930.000-7
HOSPÍ ES IONAMIENTO
CASA TAL: e e - LAS CONDES - SANTIAGO FACTURA NO AFECTA O
SP” CLÍNICA SUCURSALES: LO FONTECILLA 4174 - LAS CONDES EXENTA ELECTRONICA
CHICUREO S/N - COLINA N* 211918
E LAS CONDES EMILLE ALLAIS £91 - LO BARNECHEA
CAMINO A VALLE NEVADO 41333 - LO BARNECHEA
LOS PRESIDENTES $8950 - PEÑALOLEN
S.l.1. - SANTIAGO ORIENTE
www.clc.cl
Fecha Emisión : 08-02-2023 RUT : 10.143.057-K
Señor(es) : NALLY FERNANDEZ MARIA SOLEDAD
Dirección : MARTIN DE ZAMORA 6306 Vencimiento
Ciudad : SANTIAGO Comuna : LAS CONDES
Giro : ACTIVIDADES NO ESPECIFICADAS Forma de Pago _ : CONTADO
1.698.196
DESCRIPCIÓN
PETCT
1.698.196
102001
cuy SÉ Y
3 |
Ss $
Y OCHO MIL CIE
SON: UN MILLÓN SEISCIENTOS NOVENTA AEB NENENTA
SEIS PESOS
MONTO DSCTO [5 o
MONTO EXENTO |$ 1.698.196
1.698.196
01: j d j sio
y i We
Timbre Electronico Sil fique Documento: ww
Res. 138 de 29-11-2011 Veri
';
my $regex = qr/(FACTURA.*?(?!ELECTR))/simp;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
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 Perl, please visit: http://perldoc.perl.org/perlre.html