powered by
Replace all substrings of the specified string value that match regexp with rep.
regexp_replace(x, pattern, replacement)# S4 method for Column,character,character regexp_replace(x, pattern, replacement)
# S4 method for Column,character,character regexp_replace(x, pattern, replacement)
a string Column.
a regular expression.
a character string that a matched pattern is replaced with.
pattern
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
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
# NOT RUN { regexp_replace(df$c, '(\\d+)', '--') # }
Run the code above in your browser using DataLab