regexp_replace {SparkR}R Documentation

regexp_replace

Description

Replace all substrings of the specified string value that match regexp with rep.

Usage

regexp_replace(x, pattern, replacement)

## S4 method for signature 'Column,character,character'
regexp_replace(x, pattern, replacement)

Arguments

x

a string Column.

pattern

a regular expression.

replacement

a character string that a matched pattern is replaced with.

Note

regexp_replace since 1.5.0

See Also

Other string_funcs: ascii, base64, concat_ws, concat, decode, encode, format_number, format_string, initcap, instr, length, levenshtein, locate, lower, lpad, ltrim, regexp_extract, reverse, rpad, rtrim, soundex, substring_index, translate, trim, unbase64, upper

Examples

## Not run: regexp_replace(df$c, '(\\d+)', '--')

[Package SparkR version 2.1.3 Index]