crunch (version 1.30.4)

escapeRegex: 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)

Value

string, escaped.

Arguments

string

A regular expression to escape

Examples

Run this code
if (FALSE) {
escapeRegex("Tom&Jerry")
escapeRegex(".Net")
}

Run the code above in your browser using DataLab