findInBrackets: Extract the substring(s) between the left and right...

Description Usage Arguments Value Author(s) Examples

Description

Extract the substring(s) between the left and right brackets where left is the last occurence of the left bracket before the first occurence of the right bracket

Usage

1
2
findInBrackets(string, left, right, includeLeft=FALSE,
    includeRight=FALSE)

Arguments

string

character string to extract substring from

left

left bracket (character string)

right

right bracket (character string)

includeLeft

if TRUE include left bracket into the result string. Default is FALSE

includeRight

if TRUE include right bracket into the result string. Default is FALSE

Value

substring between the left and right brackets. If not found, returns empty string.

Author(s)

Roger Day, Alex Lisovich

Examples

1
2
3
4
5
6
## Not run: 
# obtain an HTML page represented by a character string conversionPage
# then extract the link to the data file with extension 'txt':
fileName<-findInBrackets(conversionPage,"href=\"",".txt");

## End(Not run)

DAVIDQuery documentation built on Sept. 12, 2016, 6:11 a.m.