Return to index

pcre functions

[][start_pos,end_pos] = reg_filter(string,regex[,count])

top

Returns a list of start and end positions where matches were encountered.

Example:

# Example for reg_filter
println reg_filter("hello","l")  # [[2,3],[3,4]]


bool = reg_match(string,regex)

top

Does string contain a match for regular expression regex?

Example:

# Example for reg_match
println reg_match("abc123","\\d+")  # true


string = reg_replace(var,regex,replacement[,int_flags])

top

Replaces matches found in var with regex to replacement.

Example:

# Example for reg_replace
println reg_replace("abc123","\\d+","X")  # abcX