Learn R Programming

IDSL.UFA (version 2.0)

UFA_locate_regex: UFA Locate regex

Description

Locate indices of the pattern in the string

Usage

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

Value

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

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.

Examples

Run this code
pattern <- "Cl"
string <- "NaCl.5HCl"
Location_Cl <- UFA_locate_regex(string, pattern)

Run the code above in your browser using DataLab