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\nworld", "^h")


bool = reg_match(string,regex)

top

Does string contain a match for regular expression regex?

Example:

# Example for reg_match
println reg_match("hello world", "world")


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("hello world", "world", "universe")