{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset +0 Arial;}} {\*\generator Msftedit 5.41.15.1507;}\viewkind4\uc1\pard\f0\fs20 my %c +hash;\par my %chash;\par while ($binstr =~ m#(<ref(?:>| [^>]*>)(?:(?:(?!</ref>).)+)</ref>)#isg) +\{\par my $cline=$1;\par my $reference;\par my $etal;\par \tab\par \tab my ($id)=$cline =~ m#<ref id="([^"]*)">#is;\par \par \tab my ($year)=$cline =~ m#<Year>((?:(?!</Year>).)+)</Year>#is;\par \tab\par \tab\tab my @bibauthor; \par \par \par \tab\tab while ($cline =~ m#<surname>((?:(?!</surname>).)+)</surname># +isg)\tab\tab\par \tab\tab\{ my $con=$1;\par \tab\tab\tab \par \tab\tab\tab\tab push(@bibauthor,$con); \par \tab\tab\tab\par \tab\tab\}\par \par \par \tab\tab my $i =$#bibauthor -1;\par \par \tab\tab for my $j(0..$i)\par \tab\tab\{\par \tab\tab\tab $reference .='van '.quotemeta($bibauthor[$j]).'[, \\(\\)& +\\#38;]*';\par \tab\tab\tab\par \tab\tab\}\par \par \par \tab\tab\par \tab\tab if($i eq '-1')\par \tab\tab\{\par \par \tab\tab $reference =~ s#^#$bibauthor[0].'[\\, \\(\\)]*'.'(?:(?:\\d\{ +4\}[\\, \\(\\)]*)</ref>)*)'.$year#ise;\par \tab\tab $chash\{$reference\}=$id;\par \par \par \tab\tab\}\par \tab\tab elsif($i eq '0')\par \tab\tab\{ my $t=$i+1;\par \tab\tab\tab $reference =~ s#$#'[\\, and \\(\\)&\\#38 ]*'.$bibauthor[ +$t].'[\\, \\(\\)]*'.'(?:(?:\\d\{4\}[\\, \\(\\)]*)</ref>)*)'.$year#i +se;\par \tab\tab\tab $chash\{$reference\}=$id;\par \tab\tab \}\par \tab\tab else\tab \{\par \tab \tab my $t=$i+1;\par \tab \tab\par \tab\tab\tab\par \tab\tab\tab $reference =~ s#$#'[\\, and \\(\\)&\\#38 ]*'.$bibauthor[ +$t].'[\\, \\(\\)]*'#ise;\par \tab\tab\tab $etal ='(?:'.$reference.'|'.$bibauthor[0].'[\\, et al\\., + \\(\\)]*'.')'.'(?:(?:\\d\{4\}[\\, \\(\\)]*)</ref>)*)'.$year;\par \tab\tab\tab $chash\{$etal\}=$id;\tab\tab\tab\par \}\par \tab \par \tab \par \tab\tab\par \tab\par \tab\}\par \tab\par \par \tab\par \}\par \par \par \par my @creference=keys %chash;\par for my $ref(@creference)\par \{\par \par $binstr =~ s#($ref)#<cite refid="$chash\{$ref\}">$1</ref>#isg;\par \}\par \par $input =~ m#(<ref [^><]*>)\\(((?:(?:(?!</ref>).)+)</ref>;((?:[ ]*<ref +[^><]*>[^\\(](?:(?:(?!</ref>).)+)[^\\)]</ref>[;]*)*)<ref [^><]*>[^\\( +](?:(?:(?!</ref>).)+))\\)(</ref>)#\\($1$2$3\\)#isg;\par \par \par \par }

In reply to text file to pdf file by babug_prg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.