Changeset 1303 for cpc/trunk/project/batch
- Timestamp:
- Aug 29, 2010, 6:28:09 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpc/trunk/project/batch/hemicycle/parse_hemicycle.pl
r926 r1303 69 69 } 70 70 71 $string =~ s/<\/?sup>//g; 72 $string =~ s/<!--[^A-Z]+-->//g; 73 #Recherche des numéros de de loi 74 while($string =~ /ordre du jour([^<]+\W(proposition|loi)\W[^<]+)\(n\D+(\d+[^\)]+)\)/ig) { 75 # print "$1 - $2 - $3\n"; 76 $titre = lc $1; 77 $no = $3; 71 sub savepLoi() { 72 $no =~ s/ / /g; 73 $no =~ s/\s*et\s*/,/g; 78 74 $no =~ s/[^\d,]//g; 79 75 @no = split(/,/, $no); 80 76 $no = ''; 81 77 foreach (@no) { 82 78 s/(\d{4})(\d{4})/$1,$2/g; 83 79 s/(\d{3})(\d{3})/$1,$2/g; 84 85 86 80 s/^0+//; 81 s/,0+//; 82 $no .= $_.','; 87 83 } 88 84 chop $no; 89 85 if ($no) { 90 $titre =~ s/[^<]+ loi //; 91 $ploi{$titre} = $no; 92 } 86 # print "TEST3 $titre -_- $no\n"; 87 $ploi{$titre} = $no; 88 } 89 } 90 91 $string =~ s/’/'/g; 92 $string =~ s/<\/?sup>//g; 93 $string =~ s/<!--[^A-Z]+-->//g; 94 #Recherche des numéros de de loi 95 while($string =~ /#item#\d+\.?\s*([^#]+)\(n\D+(\d+[^\)]+)\)\s*#\/item#/ig) { 96 # print "TEST1 $1 -_- $2 \n"; 97 $titre = lc $1; 98 $no = $2; 99 savepLoi(); 100 } 101 while($string =~ /ordre du jour([^<]+\W(proposition|loi)\W[^<]+)\(n\D+(\d+[^\)]+)\)/ig) { 102 if ($1 =~ /#item#/i) { 103 next; 104 } 105 # print "TEST2 $1 -_- $2 -_- $3\n"; 106 $titre = lc $1; 107 $no = $3; 108 $titre =~ s/[^<]+ loi,? //; 109 savepLoi(); 93 110 } 94 111
Note: See TracChangeset
for help on using the changeset viewer.