extract_field {matriz} | R Documentation |
Extract field value from BibTeX entry
Description
Extracts the value of a specified field from a BibTeX entry string using regular expressions. The function is case-insensitive and handles various spacing patterns around the field delimiter.
Usage
extract_field(entry, field)
Arguments
entry |
Character string containing a BibTeX entry |
field |
Name of the field to extract (e.g., "title", "author", "year") |
Details
The function searches for patterns of the form "field = {value}" in the BibTeX entry, ignoring case and allowing for variable whitespace around the equals sign. The value is expected to be enclosed in curly braces.
Value
Character string containing the field value if found, NA if the field is not present
[Package matriz version 1.0.1 Index]