Description Usage Arguments Value Examples
Check if template metadata field matches provided format, and return matched value in a list.
1 2 3 4 5 6 7 8 9 10 11 |
x |
a string containing template metadata |
title |
a string containing metadata field title (can be regex-powered) |
regex |
a string with regular expression to match field value |
short |
a string with a short name for given metadata field |
trim.white |
a logical value indicating whether trailing and leading spaces of the given string should be removed before extraction |
mandatory |
a logical value indicating required field |
default.value |
fallback to this value if non-mandatory field is not found/malformed |
field.length |
maximum number of field characters (defaults to 1000) |
... |
additional parameters for |
a list with matched content, or NULL
if the field is not required
1 2 3 4 5 6 7 8 9 10 | ## Not run:
rapport:::extract.meta("Name: John Smith", "Name", "[[:alpha:]]+( [[:alpha:]]+)?")
## $name
## [1] "John Smith"
rapport:::extract.meta("Name: John", "Name", "[[:alpha:]]+( [[:alpha:]]+)?")
## $name
## [1] "John"
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.