MXP_locate_regex: MXP Locate regex

View source: R/MXP_locate_regex.R

MXP_locate_regexR Documentation

MXP Locate regex

Description

Locate indices of the pattern in the string

Usage

MXP_locate_regex(string, pattern, ignore.case = FALSE, perl = FALSE, fixed = FALSE,
useBytes = FALSE)

Arguments

string

a string as character

pattern

a pattern to screen

ignore.case

ignore.case

perl

perl

fixed

fixed

useBytes

useBytes

Details

This function returns 'NULL' when no matches are detected for the pattern.

Value

A 2-column matrix of location indices. The first and second columns represent start and end positions, respectively.

Examples

pattern <- "Cl"
string <- "NaCl.5HCl"
Location_Cl <- MXP_locate_regex(string, pattern)

IDSL.MXP documentation built on March 31, 2023, 9:02 p.m.