quotemeta

Quote meta characters.

QUOTEMETA

NAME

quotemeta - Quotes and protects metacharacters.

SYNOPSIS

quotemeta(string)

PARAMETERS

string
String to be quoted.

DESCRIPTION

This function protects metacharacters: it will return the input string after having introduced an antislash before each one of these characters: .\+*?^($)[]

RETURN

Returns the string with its metacharacters quoted.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

in:  res={_{quotemeta(".\/*")}}.
out: res=\.\\\/\*.

SEE ALSO

{{ include("includes/strings.sn") }}

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2024 extenso Inc. All rights reserved.