regexp_extract {SparkR}R Documentation

regexp_extract

Description

Extract a specific(idx) group identified by a java regex, from the specified string column.

Usage

## S4 method for signature 'Column,character,numeric'
regexp_extract(x, pattern, idx)

regexp_extract(x, pattern, idx)

See Also

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

Examples

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

[Package SparkR version 1.6.1 Index]