D
Dafke8
Hi all,
I'm making a perl script that takes names of people out of a text and than I
must link the persons name to the text where his name was in.
But now i'm trying to get a list with all the names in the text. I already
have an array with the text but when i try to get all the names in a list, i
only get the first name.
Below is the code i use for it:
(every name is between a <span class="naam" id="n1"></span> tag)
foreach $i (@inputtext){
$i =~ /<span\sclass="naam"\sid="n[0-9]+">(.*?)<\/span>/g;
@test = $1;
}
Does anyone know what the problem is with my expression?
below is a piece of the text i'm searchin in:
<h3><font color="#0000FF">BA585 Akte nr.<span class="akte"
id="a0">1774-1</span> Bestand: 480 - 481</font></h3>
<p>Op 21 februari 1774 lenen <span class="naam" id="n0">Verachtert Petrus
Josephus</span> en zijn echtgenote <span class="naam" id="n1">Verboven Anna
Elisabeth</span> bij <span class="naam" id="n2">Bleirinckx Marten</span>,
<span class="naam" id="n3">Groenen Jan</span> en <span class="naam"
id="n4">Van Nuten Jan</span>, administrateurs van de fondatie gefondeerd
door wijlen de Heer <span class="naam" id="n5">Swinnen Henricus</span>, ten
gunste van de <span class="plaats" id="p1">kapel van Meren</span>.</p>
<p>Zij hypothekeren een huis, hof,schuur en binnenveld in <span
class="plaats" id="p2">Boeckel</span>. Palende oost: den <span
class="plaats" id="p3">Aert</span>, zuid: d'erfgen. <span class="naam"
id="n6">Bellens Adr.</span>, west: <span class="naam" id="n7">Van Eynde
Jan</span>, noord: <span class="naam" id="n8">Hermans Peeter</span> en een
perceel land genaamd den <span class="plaats" id="p4">langen reep</span>.
Palende oost: d'erfgen. <span class="naam" id="n9">Bellens Adr.</span> en
den <span class="plaats" id="p5">Aert</span>, zuid: de <span class="plaats"
id="p6">Bijlestraete</span> west: <span class="naam" id="n10">Verdonck
Maria</span>, noord: <span class="naam" id="n11">Van Hove Jan</span>.</p>
I'm making a perl script that takes names of people out of a text and than I
must link the persons name to the text where his name was in.
But now i'm trying to get a list with all the names in the text. I already
have an array with the text but when i try to get all the names in a list, i
only get the first name.
Below is the code i use for it:
(every name is between a <span class="naam" id="n1"></span> tag)
foreach $i (@inputtext){
$i =~ /<span\sclass="naam"\sid="n[0-9]+">(.*?)<\/span>/g;
@test = $1;
}
Does anyone know what the problem is with my expression?
below is a piece of the text i'm searchin in:
<h3><font color="#0000FF">BA585 Akte nr.<span class="akte"
id="a0">1774-1</span> Bestand: 480 - 481</font></h3>
<p>Op 21 februari 1774 lenen <span class="naam" id="n0">Verachtert Petrus
Josephus</span> en zijn echtgenote <span class="naam" id="n1">Verboven Anna
Elisabeth</span> bij <span class="naam" id="n2">Bleirinckx Marten</span>,
<span class="naam" id="n3">Groenen Jan</span> en <span class="naam"
id="n4">Van Nuten Jan</span>, administrateurs van de fondatie gefondeerd
door wijlen de Heer <span class="naam" id="n5">Swinnen Henricus</span>, ten
gunste van de <span class="plaats" id="p1">kapel van Meren</span>.</p>
<p>Zij hypothekeren een huis, hof,schuur en binnenveld in <span
class="plaats" id="p2">Boeckel</span>. Palende oost: den <span
class="plaats" id="p3">Aert</span>, zuid: d'erfgen. <span class="naam"
id="n6">Bellens Adr.</span>, west: <span class="naam" id="n7">Van Eynde
Jan</span>, noord: <span class="naam" id="n8">Hermans Peeter</span> en een
perceel land genaamd den <span class="plaats" id="p4">langen reep</span>.
Palende oost: d'erfgen. <span class="naam" id="n9">Bellens Adr.</span> en
den <span class="plaats" id="p5">Aert</span>, zuid: de <span class="plaats"
id="p6">Bijlestraete</span> west: <span class="naam" id="n10">Verdonck
Maria</span>, noord: <span class="naam" id="n11">Van Hove Jan</span>.</p>