Learn R Programming

MplusAutomation (version 1.2)

friendlyGregexpr: Friendly Regular Expression

Description

Creates data frame documenting the start and end of all tags.

Usage

friendlyGregexpr(pattern, charvector, perl = TRUE, include_tag = TRUE)

Value

A data.frame

Arguments

pattern

The pattern to search for

charvector

Character vector

perl

A logical whether or not to use perl based regular expressions. Defaults to TRUE.

include_tag

if TRUE, return the match as a character string. This is the default, but setting to FALSE is a bit faster

Author

Michael Hallquist

Examples

Run this code
if (FALSE) {
  friendlyGregexpr("(BY|WITH|ON)", 
    c("POS_WI BY", "X WITH Y WITH Z")
  )
} 

Run the code above in your browser using DataLab