verEx: look for something at the beginning of a line

Description Usage Details Examples

View source: R/vRbalExpressions.R

Description

look for something at the beginning of a line

look for something at the end of a line

what to look for

alias for 'then' for start of an expression

maybe something is there?

any character any number of times

any character any number of times BUT this

Any character at least one time

Any character at least one time except for these characters

Line break

html shorthand

tab

Any alphanumeric

Any given character

Any given character (short)

Range

or

creates an empty vRbalExpression object that can be added to

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
  startofline(value)

  endofline(value)

  then(value)

  find(value)

  maybe(value)

  anything(value)

  anythingBut(value)

  something(value)

  somethingBut(value)

  linebreak(value)

  br(value)

  tab(value)

  word(value)

  anyOf(value)

  any(value)

  range(from, to)

  or(value)

  verEx(x = "")

Details

vRbalExpressions are added together by calling the various constructors. Alternatively, an empty expression can be created by the call to 'verEx()'.

Examples

1
2
3
testExpr <- startofline() + then("http") + maybe("s") + then("://") + maybe("www.") + anythingBut(" ") + endofline()
testWWW <- "https://www.google.com"
grepl(testExpr, testWWW)

rmflight/vRbalExpressions documentation built on May 27, 2019, 9:32 a.m.