You are here

function PARSEENTRIES::fullSplit in Bibliography Module 5

Same name and namespace in other branches
  1. 6.2 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::fullSplit()
  2. 6 bibtexParse/PARSEENTRIES.php \PARSEENTRIES::fullSplit()
  3. 7.3 plugins/biblio_style/bibtex/PARSEENTRIES.php \PARSEENTRIES::fullSplit()
  4. 7 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::fullSplit()
  5. 7.2 modules/bibtexParse/PARSEENTRIES.php \PARSEENTRIES::fullSplit()
1 call to PARSEENTRIES::fullSplit()
PARSEENTRIES::parseEntry in bibtexParse/PARSEENTRIES.php

File

bibtexParse/PARSEENTRIES.php, line 291

Class

PARSEENTRIES

Code

function fullSplit($entry) {
  $matches = preg_split("/@(.*)[{(](.*),/U", $entry, 2, PREG_SPLIT_DELIM_CAPTURE);
  $this->entries[$this->count]['bibtexEntryType'] = strtolower(trim($matches[1]));

  // sometimes a bibtex entry will have no citation key
  if (preg_match("/=/", $matches[2])) {

    // this is a field
    $matches = preg_split("/@(.*)\\s*[{(](.*)/U", $entry, 2, PREG_SPLIT_DELIM_CAPTURE);
  }

  // print_r($matches); print "<P>";
  $this->entries[$this->count]['bibtexCitation'] = $matches[2];
  $this
    ->reduceFields($matches[3]);
}