escapeRegex: Escape a regular expression

View source: R/misc.R

escapeRegexR Documentation

Escape a regular expression

Description

This function takes a string and escapes all of the special characters in the string. For example, the . in VB.NET will be escaped with a slash (though regular R printing will make it look like there are two slashes).

Usage

escapeRegex(string)

Arguments

string

A regular expression to escape

Value

string, escaped.

Examples

## Not run: 
escapeRegex("Tom&Jerry")
escapeRegex(".Net")

## End(Not run)

Crunch-io/rcrunch documentation built on April 1, 2024, 1:14 a.m.