Skip to contents

Get the name/identifier an anchor tag

Usage

getAnchorName(tag)

Arguments

tag

Character string

Value

A character Name/identifier of the anchor tag

Examples

getAnchorName('<a id="section-1"></a>')
#> [1] "section-1"

# Works also for tag name instead of id
getAnchorName('<a name="section-1"></a>')
#> [1] "section-1"